Forum Discussion
DAX Measure filter value different slicer's selected value
- Anonymous2 years ago
Hi Anonymous ,
Based on my testing, if there is multiple values selected in the slicer, please try the following methods:
1.Drag the Table Team field into the slicer visual.
2.Create the new measure to calculate the number for each status.
Total team = CALCULATE( COUNTROWS('Table'), ALLEXCEPT('Table', 'Table'[Status]) )3.Create the new measure to calculate the selected values on a slicer.
Team selected = var tea = VALUES('Table'[Team]) RETURN CALCULATE( COUNTROWS('Table'), FILTER(ALLEXCEPT('Table', 'Table'[Status]), 'Table'[Team] in tea) )4.Create the new measure to calculate the values exclude the slicer selected.
Exclude selected = [Total team] - [Team selected]5.Drag the measure into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous Hi,
Thank you again. I applied your solution and I have one question, if there is multiple values selected in the slicer, what should I adjust in the measure please ?
Regards,
Tg
Hi Anonymous ,
Based on my testing, if there is multiple values selected in the slicer, please try the following methods:
1.Drag the Table Team field into the slicer visual.
2.Create the new measure to calculate the number for each status.
Total team = CALCULATE(
COUNTROWS('Table'),
ALLEXCEPT('Table', 'Table'[Status])
)
3.Create the new measure to calculate the selected values on a slicer.
Team selected =
var tea = VALUES('Table'[Team])
RETURN
CALCULATE(
COUNTROWS('Table'),
FILTER(ALLEXCEPT('Table', 'Table'[Status]), 'Table'[Team] in tea)
)
4.Create the new measure to calculate the values exclude the slicer selected.
Exclude selected = [Total team] - [Team selected]
5.Drag the measure into the table visual. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
Anonymous Many thanks for your help. 😊