Forum Discussion
Anonymous
8 years agoNot applicable
Calculate and filter not working
Hello All, I am running some survey stats and have a simple aggregate measure. I am looking to calculate the number of codes in the dataset which have less than 70% respondent agreement. I am us...
- 8 years ago
Anonymous
In that case.....Try Replacing allselected with VALUES
% Agree <70 = COUNTROWS ( FILTER ( VALUES ( Sheet1[course_code] ), [11 % Agree Col] < .7 ) )
Anonymous
8 years agoNot applicable
Hey Anonymous
Maybe you can try this:
% Agree <70 = CALCULATE(COUNT(Sheet1[course_code]),FILTER(ALLSELECTED(Sheet1),[11 % Agree Col]<.7))
The only difference is that I added ALLSELECTED to your filter. Might want to try ALL if that doesn't work. Let me know if this helps.
-Parker
Anonymous
8 years agoNot applicable
Thanks Parker neither worked :(
- Anonymous8 years agoNot applicable
How are you displaying this measure? A card visual?
Also, are you just trying to get the distinct number of codes? In which case you might want to use the DISTINCTCOUNT function
- Anonymous8 years agoNot applicable
Thanks Parker, distictcount doesnt seem to want to work either. Not at all sure why.
- v-yulgu-msft8 years ago
Microsoft Employee
Hi Anonymous,
Please try this:
% Agree <70 = CALCULATE(COUNT(Sheet1[course_code]),FILTER(ALL(Sheet1),[11 % Agree Col]<.7))
If it still doesn't work, please post sample data and show us your desired output so that I can test on my side.
Regards,
Yuliana Gu