Use Parameters
Default Parameter
By default a newly created dashboard will contain the Time Range parameter, which lets the user choose a default timerange for the data that appears in the dashboard.
By clicking on the Parameters button in the top menu, you are able to edit the Time range parameter by clicking the pen icon.

This should open up the Edit Parameter dialog, en lets you view the details of the Time range parameter.

The label is the name of the parameter that is used in the dashboard
The Parameter type can be set to either Single selection, Mutliple select, Free text, Time range and Data source.
The starttime and endtime varable names, are the variable name(s) that can be used in dashboard tiles/queries to use the selected value of the parameter.
The Show on pages lets you set which pages of the dashboard should include the parameter.
The defult value is the value that the parameter should have when first initialized.
Create a custom Parameter
Parameters can be used in Dashboards to filter on data that is being visualized. Using parameters also significantly improve dashboard rendering performance, because values are filtered as early as possible in the query. Filtering is enabled when the parameter is included in the query associated with a tile.
For more detailed information about how to set up and use different kinds of parameters see Use parameters in dashboards.
Click the Parameters button in the top of the dashboard.
Click the Add button.

You must specify a Name for the Label (Will be shown in Dashboard selection)
Give it an optional description and set a Variable Name that can be used in your queries as a filter
Set it to be shown on the currently selected Page
Select Query and click Edit Query to specify the Query
Then add the following Query into the dialog:
Measurements
| where StartTimestamp between (_startTime .. _endTime)
| distinct HierarchicalName
| order by HierarchicalName asc

In the Add Query Dialog you can specify your Query.
In the example above, we are using the Dashboard 's Time range filter to select the HierarchicalName of all available Measurements within the Period, then we order them in ascending alphabetically.
Click the Add button
Make sure to set the Value column in the Add Parameter Dialog is set to the HierarchicalName (The column name of the Query just specified)

Use parameter to filter a Tile
You can use the Parameter that the user has selcted to filter the data that is shown in Tiles.
Add a new Tile to the dashboard by clicking Add/Add tile
Add the following Query into the query textbox:
Measurements
| where StartTimestamp between (_startTime .. _endTime)
| where HierarchicalName has _hierarchicalName
| order by StartTimestamp asc
| limit 5000
Notice the use of the parameters _startTime, _endTime and _hierarchicalName in the query, to narrow down the search.

The Query will load all Measurements from the Measurements table that has a StartTimestamp in the selecteed Time range and has the selected Tag name (HierarchicalName), it then orders the Measurements by StartTimestamp and then limits the query to only load 5000 data points.
For more details on Parameters please see Microsoft Dooumentation and the Azure Data Explorer Parameters.
Visualize filtered data in a Tile
You can add visualization by clicking the Add visual button. Give the Tile a name.
Select the Line chart in the Visual type dropdown.
Make sure you select the Value of the measurements for the Y column (y-axis), and the StartTimestamp as the X columns (x-axis).

If you have configured it correctly you should see a visualization similar to the above screenshot.
Having configured the Visual you can click the Apply changes then click Save to save the changes of the dashboard.

On the dashboard page - try and select different Time range and different Tag names, and watch how the Tile automatically fetches the filtered data and visualizes it.
For more details on customizing visuals, please see Microsoft Dooumentation Azure Data Explorer Customize dashboard visuals.
Last updated
Was this helpful?