Forum Discussion

annaka05's avatar
annaka05
Icon for Helper I rankHelper I
3 years ago
Solved

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 a...
  • v-jianboli-msft's avatar
    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.