Search code examples
business-intelligencebold-bi

How do I use a Dashboard Parameter in the properties of a Widget in Bold BI?


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.

Defining the dashboard parameter

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.

Dashboard properties

In the dashboard editor, the widget's subtitle displays the dashboard parameter as literal text with a bold font.

Dashboard editor

When I enter the preview, the dashboard parameter disappears, leaving only the leading @.

Dashboard preview

How do I make my Dashboard Parameter (MinimumCost) appear in the Widget's Subtitle?


Solution

  • 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.

    1. Open the editor for the data source used in your dashboard.

    2. Click the "Dashboard Parameter" icon Dashboard Parameter Icon, create the desired Dashboard Parameter, and select Update.

    Dashboard Parameters

    1. Click the "Expression" icon Expression Icon in the toolbar to open the expression popup.

    2. Enter the name of your desired Dashboard Parameter into the Expression field using the format @{{:ParameterName}}.

    Expression Designer

    1. Return to the dashboard editor and edit the properties of the desired widget to add the expression you created as {{:ExpressionName}}.

    Editing expression properties

    1. Click "Preview" to see the parameter value in the widget.

    enter image description here

    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)

    Expression designer, converting parameter to string)