Forum Discussion
frankGB
2 years agoFrequent Visitor
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, ...
- Anonymous2 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.
- 2 years ago
This works very well. Thank you so much!
Anonymous
2 years agoNot applicable
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
2 years agoFrequent Visitor
This works very well. Thank you so much!