Forum Discussion
DHB
6 years agoHelper V
Use Filters in Measure DAX
I have a list a set of data which I've used this DAX to calculate percentages of the total records; DIVIDE(COUNT(ACTIVITY[PERSON_CODE]),CALCULATE(COUNT(ACTIVITY[PERSON_CODE]),ALL(ACTIVITY))) ...
- 6 years ago
I would first try your original measure with ALLSELECTED() instead of ALL().
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years ago
Hi DHB ,
You may try to use the below measure:
DIVIDE(COUNT(ACTIVITY[PERSON_CODE]),CALCULATE(COUNT(ACTIVITY[PERSON_CODE]),ALLSELECTED(ACTIVITY)))Please try.
Aiolos Zhao
DHB
6 years agoHelper V
This page in my report is filtered to 2019 and active users (1102 in total). My original DAX didn't filter out other years or user states so gave me a % of 60.9 in the gauge. the new DAX gives me the right % but it doesn't change when I move the slider on the left.