Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'd like to calculate count percentages within a group, not group percentages of an entire field/data set
Here's the measure:
% of Students Growth > 1 = DIVIDE(CALCULATE(COUNTROWS(SAYOT_Student_diff), SAYOT_Student_diff[Diff] > 1), COUNTROWS(SAYOT_Student_diff))
In English, the logic is to calculate the percentage of rows where Diff was greater than 1 per category, which is another field in the table
The measure works fine when no filters are applied, but produces weird results whenever I apply a filter. I've looked into ALLSELECTED but wasn't getting anything out of that
Hi @kimchizal,
Based on my test, you could refer to below formula:
Sample data:
Create below measure:
% of Students Growth > 1 = DIVIDE(CALCULATE(COUNT(SAYOT_Student_diff[Diff]),FILTER(ALL(SAYOT_Student_diff), SAYOT_Student_diff[Diff] > 1)), COUNTROWS(ALL(SAYOT_Student_diff)))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @kimchizal
Can you show your data model or share the pbix?
Is this the only table in your model? What slicers are you using when the measure doesn't work as expected?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |