Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Create subtotal for only required hierarchy rows

Hi All,

 I have attached my report below .

 

Hierarchy columns used above are  1->2->3->4->5 

I have enabled subtoal in matrix report .So the subtotal are coming for all the row header separately 

 

But for me i want to show ony subtotal for column 3 and grand total in final  . Is it possible in power BI ?

 

Could you please anyone help on this ?

 

4 Replies

  • v-yingjl's avatar
    v-yingjl
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

    I'm afraid not. Row total is its own attribute in Matrix, we can turn on / off globally in this visual, not only show part of rowtotals.

    What we can do is to use isinscope() to show part of them as blank if we need like this:

    Total =
    IF (
        ISINSCOPE ( 'Table'[Group1] ),
        SUM ( 'Table'[Value] ),
        IF (
            ISINSCOPE ( 'Table'[Category] ),
            IF (
                SELECTEDVALUE ( 'Table'[Category] ) = "A",
                SUM ( 'Table'[Value] ),
                BLANK ()
            ),
            SUM ( 'Table'[Value] )
        )
    )

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-yingjl , Thanks for your input , I dont have Blank issue .

      If you see my attached report format .

       

       column 3 need to show subtotal in all the split  and finally column1 will be also enabled to show grand  total.

       

      Ex report like below 

       

      1                2              3              4           5          year2017( Sales)

       

      X                x1            x11           x2      x3             100

                                                                   Y3             200

                                                        Z2       Z3             100

                                         total                                    400

      b                 b1            b2            b3         b4          100

                                                                       c3            200

                                                         d3          d4            100

                                         total                                      400

      total                                                                         800