Forum Discussion
Additional subtotal in matrix
Hi,
is it possible to add additional subtotal in matrix visualisation?
I have two row levels and I would like to have Subtotal for all A values and all B values, just like below:
I will be appreciate for any suggestions.
Anna
Hi annaka05 ,
Based on your description, I have created a simple sample:
Please try:
Measure = var _a = SUM('Table'[Value]) var _b = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="A")) var _c = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="B")) return IF(ISINSCOPE('Table'[ID]),_a,"Total A: " &_b&" Total B: "&_c&" Total: "&_a)Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- v-jianboli-msft
Community Support
Hi annaka05 ,
Based on your description, I have created a simple sample:
Please try:
Measure = var _a = SUM('Table'[Value]) var _b = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="A")) var _c = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="B")) return IF(ISINSCOPE('Table'[ID]),_a,"Total A: " &_b&" Total B: "&_c&" Total: "&_a)Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- annaka05
Helper I
- lbendlin
Super User
Please don't duplicate data in the same visual. Use a separate visual.