Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How to change Matrix subtotal aggregation to a % Change instead?

Running into a "fun" problem.  Have a report that looks like below.  The State values in Columns are based on a State column and the 2 values are based on a filter in the Matrix visual.  I am trying to create a % change and can't seem to figure it out since I don't have 2 different columns, I have just 1 that shows 2 or 3 values based on a filter.  Any good way you have solved this?  Appreciate all the help!

 

 CaliforniaMichigan
120 Days150175
90 Days200235
60 Days250295
30 Days300355
14 Days350415
7 Days400475
3 Days450535
Event500595
Post Event550655
Total31503735

 

2 Replies

  • hI Anonymous ,

     

    To make the calculation easier I would remove the total row and unpivot the location columns and then use this measure:

     

    Percentage = 
    DIVIDE (
        SUM ( 'Table'[Value] ),
        CALCULATE ( SUM ( 'Table'[Value] ), ALLSELECTED ( 'Table'[Category] ) )
    )
    

     

    Please see attached pbix for details.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the effort but I don't want a % of total, I need a % of change between the 2 values.  So 150 to 175 what is the % of change.