Forum Discussion
Calculation Groups to Affect Only One Measure
Hi there,
Imagine I have these Columns with theses measures in a matrix visual: Revenue, Cost, Margin (more ten measures)... Revenue Previous Year.
I would like in the same matrix to apply a Calculation Group of previous year to just the Revenue Previous Year measure.
Is it possible? Because the base Measure is the same - which is revenue. I would like to avoid increasing the number of measures.
Adding a calculation group as a column should be avoided. Any ideas...
- Anonymous2 years ago
Hi campelliann ,
You can use SELECTEDMEASURENAME() function.
IF ( SELECTEDMEASURENAME() = "Revenue Previous Year", CALCULATE ( SELECTEDMEASURE(), SAMEPERIODLASTYEAR('Date'[Date]) ), SELECTEDMEASURE() )Add the Calculation Group to your matrix visual. It should now only affect the "Revenue Previous Year" measure, as per the conditional logic.
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.
1 Reply
- AnonymousNot applicable
Hi campelliann ,
You can use SELECTEDMEASURENAME() function.
IF ( SELECTEDMEASURENAME() = "Revenue Previous Year", CALCULATE ( SELECTEDMEASURE(), SAMEPERIODLASTYEAR('Date'[Date]) ), SELECTEDMEASURE() )Add the Calculation Group to your matrix visual. It should now only affect the "Revenue Previous Year" measure, as per the conditional logic.
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.