Category / Section
How to configure relative date filter on using dashboard parameter in Date picker widget
Published:
This article provides a detailed explanation on how to implement the relative date option within a date picker when configuring it through a dashboard parameter. Follow the steps below to achieve this using dashboard parameter.
Relative date option in Dashboard parameter
- Edit the data source and in the data source designer page, click on the dashboard parameter (below highlighted icon) option:
- In the dashboard parameter window, select
Mode
as Literal andType
as Date and then in theSelection Type
as Range. - In the below dropdown, click on the Add Relative Range to add new relative date range options in the dashboard parameter.
- Once Relative date range window is opened, configure the needed relative range by selecting from the dropdown and click on Add button. After adding the required relative ranges click on Apply button and then click on Update the dashboard parameter. Save the data source.
- Drag and drop the Date Picker widget in to the designer. In the Assign data section configure the created dashboard parameter to the Column like below. In the properties window, enable Range and Act as Master Widget for applying filter.
- To apply date filtering across other widgets in the dashboard, you have to configure the master- slave configuration with the date field you have in the data like below and also configure the required listener widgets by selecting it in the below window.
- Once master-slave configuration is done, filtering will work fine as expected.
Setting the Default Selection as a Relative Date Range in the Date Picker Widget
Now, you can achieve default range selection by selecting required range in the designer and then entire dashboard will be filtered initially based on default relative date range. You can also change and apply the relative date selection in Preview or Published window.