Configuring Label Parameters
NOTE
Label
parameters are not supported for the SSAS data source currently.
Using label parameters in the dashboard widgets title section
You can configure the label parameters by using the field name in the Header
of widget. Use the below format to configure the label parameter.
Syntax: {{:Column_Name}} when single data source is present
Or
Syntax: {{:DataSource_Name.Column_Name}} when more than one data source is present.
For example, The header text of the Grid widget as: Ship Country - {{:ShipCountry}}.
Now, the dashboard will show the label parameter for all the countries like Ship Country - All
You can select the required country to display by selecting the country name in the grid widget. Based on the selected country the values will be displayed on the widget.
Using label parameters in the label widget
You can also use label widget to configure the label parameters.
Drag and drop the label widget into the design pane and click the edit label to add the label parameters.
While previewing the dashboard, initially the parameter of the ship country will be shown as All
in the label widget.
While selecting the particular country, it will show that Country name in the label widget.
You can add the data source before the parameters in Header
of the properties pane, when more than one data source can be present in the dashboard.
While previewing the dashboard, initially the values of the parameters will be shown as All
.
While selecting the particular country, you can show that country name in the widget.
Functions supported in label parameters
You can configure the label parameters using the column name with functions like Sum, Count, Average, Min, Max, StdDev, Var, Distinct Count, Weighted Score
for numeric values.
For Date Time
type, the supported functions are Date, Year, Month, Quarter, Day, Day Month Year, Minutes, Second, Month Year, Date Hour, Day of Week and Week of Year
.
For Text
type, the supported functions are Count and Distinct Count
.
Use the below format to configure the label parameter.
Syntax: {{:function(Column_Name)}} when single data source is present
Or
Syntax: {{:function(DataSource_Name.Column_Name)}} when more than one data source is present.
Function Name | Supported Type(s) | Description | Example(s) |
---|---|---|---|
Sum | Number | This function will return the summation of the given column in number format. | Total Quantity - {{:Quantity}} or Total Quantity - {{:sum(Quantity)}} |
Average | Number | This function will return the average of the given column in number format. | Average freight amount is {{:avg(Freight)}} or {{:average(Freight)}} |
Count | Number, Text, Date Time | This function will return the count of the given column in numeric format. | Number of records : {{:count(Quantity)}} or Number of records : {{:count(ShipCountry)}} or Total Transactions : {{:count(InvoiceDate)}} |
DistinctCount | Number, Text, Date Time | This function will return the count of distinct values in the given column in number format. | Number of unique records are {{:dcount(OrderID)}} or {{:distinctcount(OrderID)}} Countries count is {{:dcount(ShipCountry)}} or {{:distinctcount(ShipCountry)}} Total unique transaction count is, {{:dcount(InvoiceDate)}} |
StandardDeviation | Number | This function will return the standard deviation of the column values in number format. | Standard Deviation of Quantity : {{:stdev(Quantity)}} |
Minimum | Number | This function will return the minimum value in the given column in number format. | Minimum value of Quantity: {{:min(Quantity)}} |
Maximum | Number | This function will return the highest value of the given column in number format. | Maximum value of Quantity: {{:max(Quantity)}} |
WeightedAverage | Number | This function will return the weighted average of the first column based on the weight given by the second column in number format. | Weighted Average for sales amount against freight is {{:WeightedAvg([SalesAmount],[Freight])}} |
Date | Date Time | This function will return the date value as string, formatted based on the current system culture. | Sales done on {{:date(ShippedDate)}} |
DayMonthYear | Date Time | This function will return the date value as string formatted in DD/MM/YYYY format. | Sales done on - {{:daymonthyear(ShippedDate)}} |
MonthDayYear | Date Time | This function will return the date value as string formatted in MM/DD/YYYY format. | Sales done on - {{:monthdayyear(ShippedDate)}} |
Year | Date Time | This function will return the year in number format. | Revenue for the Year - {{:year(ShippedDate)}} |
Month | Date Time | This function will return the month name as MMM format on selected row. | Weather in NYC - {{:monthname(ShippedDate)}} |
Quarter | Date Time | This function will return the ‘Quarter 1/2/3/4’ based on calendar year on selected row. | Total sales for the Quarter - {{:quarter(ShippedDate)}} |
Day | Date Time | This function will return the day value (1-28/29/30/31) on selected row. | Store rate for the day - {{:day(ShippedDate)}} |
Minutes | Date Time | This function will return the minute value (00-59) on selected row. | Stock rate in - {{:minutes(ShippedDate)}} minutes |
QuarterYear | Date Time | This function will return the ‘Quarter 1/2/3/4’ and the year based on calendar year on selected row. | Total sales in - {{:quarteryear(ShippedDate)}} |
MonthYear | Date Time | This function returns the Month and Year as MMM YYYY format for the selected record. | Weather in NYC on {{:monthyear(ShippedDate)}} |
DateHour | Date Time | This function returns the Date and Hour values for the selected record. | Total sales in - {{:datehour(ShippedDate)}} |
DayOfWeek | Date Time | This function returns the day value of the week (Sunday to Saturday) for the selected record. | Weather in NYC on {{:dayofweek(ShippedDate)}} |
WeekOfYear | Date Time | This function returns the week value of the respective year as number in selected record. | Week of the year is, {{:weekofyear(ShippedDate)}} |
NOTE
Function name of label parameters are
case insensitive
.
Last refresh time for dashboard/widgets:
You can display last refresh time using the keyword UpdatedTime
in the Heading or Subheading section of widgets or dashboards. Use the below format to configure the label parameter.
NOTE
Syntax: {{:UpdatedTime}}
For example, The Heading
or Subheading
text of the Grid widget as:
{{:UpdatedTime}}
.
Now, the Heading shows last refresh time of that widget. You can also use other label parameters in Heading
and Subheading
.
Display last refresh time in label widget
Label widget can also be used for showing last refresh time.
Drag and drop the label widget into the design pane and click the edit label to add the below label parameters.
Syntax: {{:UpdatedTime}}
NOTE
To know the list of functions supported by the UpdatedTime refer to this Knowledge base article.