top of page

Hide dashboard filters

Updated: Jan 4

Sometimes, you may need to apply a filter to your dashboard without making it visible. Below is a script that allows you to hide one or more dashboard filters.




Steps:

  1. Open the dashboard where you want to hide the filter.

  2. Add the script below, ensuring you update the 'filterTitles' variable with the list of filters you wish to hide.

  3. Save the script and refresh the dashboard.


const filterTitles = ['Category', 'Condition'];
dashboard.on('initialized', (dash, args) => {

	dash.filters.$$items.forEach((item, index) => {

		if (filterTitles.includes(item.jaql.title)) {

			var styles = `

					.global-filters .ew-content-host .ew-panel .ew-item-wrapper:nth-child(${index+2}) { 

						display: none;

					}`

			var styleSheet = document.createElement("style")

			styleSheet.innerText = styles

			document.head.appendChild(styleSheet)

		}

	})

})


Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page