Forum Discussion
mandyhpnguyen
3 years agoRegular Visitor
Fix Matrix Total in Dax Measure Column with Condition and Variables in Power BI?
Hi everyone, I have another Power BI Matrix Total issue as follows and hope you can help me with it. I have a made-up dataset (end of this post) that is as close to my real project as possib...
- Anonymous3 years ago
Hi mandyhpnguyen ,
This is because the context is difference, please try to create two new measure according to your original measure, try below dax formula:
Adjust Headcount = SUMX(VALUES('Table'[Animal Type]),[HeadCount])Adjust Working Hour = SUMX(VALUES('Table'[Animal Type]),[Working Hour])Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
3 years agomandyhpnguyen , Change the return like this example
return Sumx(Values(AnimalLabor[Animal Type]), calculate( tot_q1 + tot_q2 + tot_q3 + tot_q4))
mandyhpnguyen
3 years agoRegular Visitor
amitchandak I did but the result stayed the same. Did it work in your .pbix?