Forum Discussion
Use a Default Measure When Slicer is Set to 'All'
- 3 years ago
Thanks for the reply. I was actually able to get this sorted out.
What I was after, was for the visual to use a default measure, when the slicer has nothing or "All" selected. I was able to achieve this via some DAX.
You need to determine how many values the slicer has without filters, then compare to how many it has in current context:
Measure =
VAR _CountAllOptions = CALCULATE( countrows( values ( table[column] ) ), ALL() )
VAR _CountCurrentOptions = countrows( values ( table[column] ) )
VAR _Result = IF( _CountAllOptions = _CountCurrentOptions, [Default Measure], [Other Measure] )
RETURN
_Result
Thanks for the reply. I was actually able to get this sorted out.
What I was after, was for the visual to use a default measure, when the slicer has nothing or "All" selected. I was able to achieve this via some DAX.
- AllisonKennedy3 years ago
Community Champion
lg1551 Can you please share the DAX that you've used so others can benefit? I'd also be interested to learn how it differs from the DAX I suggested to you.
Thanks! and glad you got it solved.