Forum Discussion

frankGB's avatar
frankGB
Frequent Visitor
2 years ago
Solved

Matrix Roll-Up Calculations: How to avoid double counts for same values across different rows?

I am struggling to enforce correct roll-up calculations for categories when some of the sub categories have the identical values (which is the correct logic that they have). To simplfy the question, ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi frankGB ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create a measure.

    Measure = 
     SWITCH (
        SELECTEDVALUE('Metrics'[Metric Name]),
        "Counts", SUMX(VALUES('Table'[Counts]),[Counts]),
        "Actions", SUMX(VALUES('Table'[Actions]),[Actions])
     )

    (3) Then the result is as follows.

    Best Regards,

    Neeko Tang

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

  • frankGB's avatar
    frankGB
    2 years ago

    This works very well. Thank you so much!