Forum Discussion
Visualisations blank until something selected in a slicer
- 9 years ago
Hi Dave0145,
For your requirement, you can create a measure like this:
SlicerCheck = =if(calculate(distinctcount([SlicerColumn]),allsel
ected([SlicerColumn]))=1,"Y","N") Then place this measure in a table visual, set filter condition as is Y. If you want to select multiple values in a slicer, set is N.
For more information, see:
visual filter problem--unpredictable behavior
Best Regards,
Qiuyun Yu
I created a measure to do this. The measure counts the specific number of dates selected. I figure I can use this to filter based on the number of dates selected, so basically "plot data only when 10 or fewer days are selected".
Date Filtered = calculate(DISTINCTCOUNT('Data'[Date]),ALLSELECTED('Data'[Date]))I have a card on the report that shows the measure and it works appropriately. When I have nothing selected it counts all the unique dates (days). When I select one, two or whatever it counts correctly.
But when I add this to the filter on a visual it doesn't work. It's calculating the measure for each group of data (which is grouped by day and hour using the bin feature), meaning it always returns 1. How do I make this calculate for the whole page instead of per row/group in the chart?
So it's counting based on the grouping of the values rather than the distinctcount of dates? Can you use allexcept() in your measure and put the groupings name in there so it won't point to that element? Might be worth a shot.
- Anonymous8 years agoNot applicable
Hm... I tried
Date Filtered = calculate(DISTINCTCOUNT('Data'[Date]),ALLSELECTED('Data'[Date]),allexcept('Data','Data'[Date]))But it behaves the same way.