Forum Discussion
annaka05
Helper I
3 years agoAdditional 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 a...
- 3 years ago
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.
v-jianboli-msft
Community Support
3 years agoHi 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
3 years ago