Forum Discussion

krrish116's avatar
krrish116
Resolver II
5 years ago
Solved

Aggregate value based on two columns in Matrix Visual

Hi amitchandak ,

I have to show some data in a matrix visual

where in rows it contains Group , Division , Branch 

In columns it contains Value , Target.

 

Group     Division     Branch            Value    Target

A               IT             Admin               25         60

                                 Users                  10         50

                                 Workers             25         100

                                               

B             Btech          Admin              35             50

                                 Users                25             100

 

C            CSC             Admin              45          100

                                  Users               35             50

                                  Contracts         55            75

 

For Every Group they had a different values and targets.

Now i have to show aggregate in that matrix visual like

for A  -    Value(25+10+25) / Target(60+50+100)

for  B -  Value(35+25)/ Target(50+100)

etc.,

 

So final result is 

Group     Division     Branch            Value    Target

A               IT             Admin               25         60

                                 Users                  10         50

                                 Workers             25         100

                                Aggregate         total value / total target                      

B             Btech          Admin              35             50

                                 Users                25             100

                                 Aggregate         total value / total target

C            CSC             Admin              45          100

                                  Users               35             50

                                  Contracts         55            75

                                 Aggregate         total value / total target

 

Please help me in solving this.

Thanks,

Krishh

5 Replies

  • krrish116 , that  you should get as subtotal ?

    or add new measure

     


    divide(sum(Table[Value]), sum(Table[Target]))

     

    or

     

    calculate(divide(sum(Table[Value]), sum(Table[Target])), filter(allselected(Table), Table[Group] =max(Table[Group])))

    • krrish116's avatar
      krrish116
      Resolver II

      Hi amitchandak ,

      I want aggregate for each and every group in the place of subtotal?,

      and the value and target are mesures not columns.

      Thanks,

      Krishhh

       

      • amitchandak's avatar
        amitchandak
        Super User

        krrish116 , do you want to remove the subtotal of division?  Under subtotal, you have an option for Per Row Level Switch on and remove subtotal for division and branch as per need