How to change the bounded columns dynamically in a Single Widget on Bold BI
This article explains how to dynamically change the bounded columns between different data views within a single widget, enabling users to interact with data more effectively on Bold BI® dashboards.
Use Case:
In this use case, we will demonstrate how to display Sales data for various categories: Country, City, and Brand Name. This dynamic feature allows a single widget to present multiple perspectives, enhancing the interactivity and usability of your Bold BI® dashboards.
Step 1: Create a Dashboard Parameter
- Refer this document to learn how to manually add values to a dashboard parameter.
- Add the following values to the parameter:
- Country
- City
- Brand Name
- Bind the created parameter to the Combo Box Widget for dynamically filtering data based on the user’s selection.
Step 2: Create Expressions for Category Columns
Category Column Expression
This expression dynamically selects and displays the relevant data column (Country, City, or Brand Name) based on the user’s selection from the combo box. Use the following formula to display the appropriate category column dynamically:
CASE
WHEN @{{:Parameter1}} = 'Country' THEN [country]
WHEN @{{:Parameter1}} = 'City' THEN [city]
WHEN @{{:Parameter1}} = 'Brand Name' THEN [Brand_Name]
END
Step 3: Bind the Created Expressions to the Chart
- Drag and drop a Chart Widget onto the dashboard.
- Configure the chart as follows:
- Use the Sales Details for the Y-Axis.
- Use the Category Column Expression for the X-Axis.
Step 4: Add Label Parameter
Refer this document for how to create label parameter in Bold BI®. Create an expression by using the dashboard parameter column which was already created in step1.
Use the created expression as label parameter in the widget title to reflect the current selection dynamically.
Step 5: Finalize and Preview
- Combine the Combo Box and Bar Chart widgets using the Combined Widget feature.
- Use the Combo Box to toggle between viewing data for the various categories
- Preview the dashboard to ensure that it displays the correct data for each category:
Sales by Country:
Sales by City:
Sales by Brand Name:
By following these steps, you can toggle between multiple data views within a single widget, enabling a highly interactive and streamlined experience for users on Bold BI® dashboards. This approach not only reduces the need for multiple widgets but also enhances the usability of your dashboards.