Implementing Dynamic Top N Filters in Bold BI Dashboard Using Dashboard Parameters in Code View
Implementing dynamic Top N records filtering in a Bold BI dashboard can be achieved by utilizing a Dashboard Parameter in the code view mode of a data source. This method allows you to dynamically control the number of records displayed in your dashboard components. Here’s how you can set up dynamic Top N records filtering:
Step 1: Create a Dashboard Parameter
- Edit the data source where you want to apply the Top N records filter. Create a numeric single type of dashboard parameter and save it. This parameter will control the number of records to display.
- Switch to the code view mode of your data source.
- To apply the created dashboard parameter, use the keyword
TOP
followed by theSELECT
keyword in your data source query. Then, enter the symbol@
and select the created dashboard parameter.
Step 3: Run the Query
- After applying the dashboard parameter in the query, run it to see the changes. The preview grid will now render with the applied Top N records filter, displaying the specified number of records.
- Now, you can see that the widgets of the dashboard will render with the applied Top N filter value.
- You can adjust the value dynamically using the dashboard parameter TopN_Filter_Parameter on the dashboard in Preview/View mode as follows:
Important Note
While this approach provides a workaround solution for dynamic filtering, it is important to note that using the code view may impact the performance of dashboard rendering. It is recommended to consider this before implementing the method.
Additional References
Refer to the following resources for further information and guidance on configuring and using dashboard parameters in Bold BI:
By following these steps, you can successfully implement dynamic Top N records filtering in your Bold BI dashboards, allowing for a more interactive and user-driven data analysis experience.