Reset Dashboard Filters

Hi team,

Can we have Script to reset Dashboard filter values.

I have 6 filters on my Dashboard.Now i want icon or button to reset its value.

1 Like

Hello Pjadhav,

Here is the script for resting dashboard filter values using HTML button.
For HTML button creation below is the code

Click on object and then select HTML and apply this code
<button class="button">Reset</button>

and in CSS use the below code for styling the button
.button { background-color: #75a3a3; / Green / border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; }


In my case, I have 2 filters “travel_type” and “travel_medium”. For these two filters, I have set default values in the script. In case if you have more filters you have to set default values for all the filters.

Use the below JS code for resting the filters to default values

   $(".button").click(function () { 
        Dashboard.setVariable('travel_type', "Domestic");
        Dashboard.setVariable('travel_medium', ["_all_"]);

If you click on the reset button all the filters will reset with the default values. If you further want that the reports should also update as well (not only the filter) immediately then you can also apply triggers to this button and specify which all report panels should get updated with the filter values.

Thank You
Team Helical Insight