I am using Bold BI to create a dashboard and want to dynamically update the properties of a widget in the dashboard based on a dashboard parameter.
More specifically, I have a dashboard with a Line Chart widget that displays the number of orders made in a year. In the data source for said dashboard, I defined a data parameter MinimumCost
.
The documentation for dashboard parameters says I can use a dashboard parameter by following the format @{{:Parameter}}
. So in my dashboard I opened the Line Chart widget's properties and set the subtitle to Costing @{{:MinimumCost}} or more
.
In the dashboard editor, the widget's subtitle displays the dashboard parameter as literal text with a bold font.
When I enter the preview, the dashboard parameter disappears, leaving only the leading @
.
How do I make my Dashboard Parameter (MinimumCost) appear in the Widget's Subtitle?
To use a Dashboard Parameter in the properties of a Widget, create an Expression in the data source with the value of your desired Dashboard Parameter.
Open the editor for the data source used in your dashboard.
Click the "Dashboard Parameter" icon , create the desired Dashboard Parameter, and select Update.
Click the "Expression" icon in the toolbar to open the expression popup.
Enter the name of your desired Dashboard Parameter into the Expression field using the format @{{:ParameterName}}
.
{{:ExpressionName}}
.Source: BoldBI Support - How to Dynamically Change Text in a Widget Title Using Dashboard Parameters
Note: When using a numerical Dashboard parameter in an expression, I encountered an issue where the number shown in the widget was significantly larger than the user selected value, as if it had been multiplied by the number of results. You can avoid this issue by converting the value to a string in the Expression Designer with CAST(@{{:ParameterName}} AS VARCHAR)