Forum Discussion
Show Blank Data when Nothing is filtered
Hi,
I have multip;e slicers on a page with multiple visuals (tables, charts, etc). I want the visuals to show blank when nothing is selected. How do I do this successfully?
- Anonymous5 years ago
Hi Anonymous ,
You could use the following formula to create a new measure :
Measure = CALCULATE ( IF ( ISFILTERED ( 'Table'[Country] ) || ISFILTERED ( 'Table'[City] ), 1, 0 ), ALLSELECTED ( 'Table' ) )
And apply it to filter pane (set as "is 1") as shown below:Please check the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- AnonymousNot applicable
Hi Anonymous ,
You could use the following formula to create a new measure :
Measure = CALCULATE ( IF ( ISFILTERED ( 'Table'[Country] ) || ISFILTERED ( 'Table'[City] ), 1, 0 ), ALLSELECTED ( 'Table' ) )
And apply it to filter pane (set as "is 1") as shown below:Please check the pbix file here.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- mlopiccoloNew Member
Hi, I've tried this solution, but when I add the measure as a filter to the object's filter pane, I cannot set the "Show items when the value...". I can't click on it. Do you know why?
I've checked the measure, and it is working correctly (1 when filtered and 0 when not)
- lbendlin
Super User
Create a measure in lieu of your value column and set the measure to the value only when the number of slicer filters is different from the number of slicer values.
Beware! "Nothing is selected" and "Everything is selected" are treated the same by DAX.
- AnonymousNot applicable
What dax function would you use in the measure to make this successful?
- lbendlin
Super User
compare FILTERS() to VALUES()