Forum Discussion
Hierarchy Not displaying subtotal correctly
- 2 years ago
Hello,
Here is a copy of the file with the private data removed.
Thank you so much!
https://drive.google.com/file/d/1YDL4PAs9LLszekYi2rgn2vmJg8VW3v_N/view?usp=sharing - Anonymous2 years ago
Hi dc52 ,
You can modify your measure like the example below (other measures also modify like the example, you can refer to the attachement of pbix file):
Events Count by Major_ = VAR _school = SELECTEDVALUE(Students[School]) RETURN CALCULATE( DISTINCTCOUNT('Events'[ID Name]), FILTER('Students','Students'[School]=_school))And then add a new measure, put the new measure into Matrix:
Events Count by Major = SUMX(VALUES(Students[School]), [Events Count by Major_])Final output:
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi dc52 ,
You can modify your measure like the example below (other measures also modify like the example, you can refer to the attachement of pbix file):
Events Count by Major_ =
VAR _school = SELECTEDVALUE(Students[School])
RETURN
CALCULATE(
DISTINCTCOUNT('Events'[ID Name]),
FILTER('Students','Students'[School]=_school))
And then add a new measure, put the new measure into Matrix:
Events Count by Major =
SUMX(VALUES(Students[School]), [Events Count by Major_])
Final output:
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Im not sure this is counting correctly. while the hierarchy of subtotal is showing up and is adding up correcly, the Grand total count is not what it should be. for example, the coaching count shown above SHOULD add up to 2303 total but shows up as 1370.