Reset Dashboard Filters on Activation
Use this script to restore a dashboard's default filters every time it is opened, ensuring users always start from a consistent filter state.
Use this script to restore a dashboard's default filters every time it is opened. This is useful when you want users to always start from a clean, consistent filter state — regardless of any changes made in a previous session.
How it works
The script listens for the dashboard's activated event. When triggered, it clears any currently applied filters and replaces them with the default filter state saved at design time.
Script
dashboard.on("activated", (e, args) => {
console.log("Dashboard activated:", args.dashboard);
const dashFilters = args.dashboard.filters;
dashFilters.$$items = dashFilters.$$items.splice(0, dashFilters.$$items.length);
const filters = args.dashboard.defaultFilters;
var options = {
save: true,
refresh: true,
unionIfSameDimensionAndSameType: false,
};
if (!Array.isArray(filters)) {
filters = [filters];
}
dashFilters.update(filters, options);
});Where to add this script
- Open your dashboard in Edit mode.
- Click the dashboard menu (⋮) and select Edit Script.
- Paste the script into the editor.
- Save and publish the dashboard.
Options reference
Option | Value | Description |
save | true | Persists the reset so the default state is saved after activation. |
refresh | true | Triggers an immediate data reload after filters are applied. |
unionIfSameDimensionAndSameType | false | Replaces existing filters outright rather than merging with them. |
Setting your default filters
The script restores whatever filter state is saved as the dashboard's defaults. To configure this:
- Apply the desired filters in Edit mode.
- Open the dashboard menu (⋮) and select Save as Default Filters.
- Save the dashboard.
These saved filters become the baseline that the script restores on each activation.
Notes and limitations
⚠️ Internal API usage — The script accesses $$items, an internal Sisense property. This works in current versions but may be affected by future Sisense updates. Test after upgrades.ℹ️ No per-user overrides — Because save: true is set, the reset is written back to the dashboard on each activation. Users cannot maintain their own persistent filter state on this dashboard.ℹ️ Activation timing — The activated event fires each time the dashboard becomes the active tab, not only on initial load. If users switch between dashboards frequently, filters will reset on every return.Last updated on April 6, 2026