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.
Hi lg1551 ,
When you want the slicer not to select a month or quarter, the visual is empty, such as the following.
When there's a selection in the slicer, display specific results in the table visual.
Below is the solution.
1.Create a disconnnected calculated table using dax.
2.The fields of the slicer are from Table 2.
3.Create measure as the visual-level filter. Put it into the table visual and set up show items when the value is 1. And then the expected you want is done.
Measure =
IF (
ISFILTERED ( 'Table 2'[Quarter] ) || ISFILTERED ( 'Table 2'[Month] ),
IF ( MAX ( 'Table'[Month] ) IN ALLSELECTED ( 'Table 2'[Month] ), 1 )
)
The key is to create a disconnected table.
You can download my attachment for more details.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.