How to Filter the Data Based on the Month/Week of the Selected Date
This article explains how to filter slave widgets in Bold BI® dashboards based on the selected date range. For example, you will select a date such as 12-May-223 and you have 3 slave widgets. In the first widget, it will render all weekdays (7-May-2023 to 13-May-2023) of the selected date. In the second slave widget, it will render the May month data, and the 3 rd widget, it will render with the selected date.
Steps to filter Slave Widgets by Date Range
-
Create a dashboard parameter by binding the date field. To learn how to configure dashboard parameters, refer to this link.
-
Create separate data sources for daily, weekly, and monthly data. Once the data source is created, switch to the code view.
-
For weekly data
The above query will return the weekly data of the selected date.
-
For monthly data,
The above query will return the specific month data of the dashboard parameter selected. -
For daily data,
This query will return the specific date data. -
Save and view the dashboard. Try to change the parameter in view more and see the filtered slave widgets based on the selected date range. Refer to the following images:
In the above images, we used the Datepicker widget to change the dashboard parameter. And we used the grid widget as a slave widget. You can use other widgets to visualize your data.