Forum Discussion
campelliann
2 years agoPost Patron
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 Ca...
- 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.
Anonymous
2 years agoNot 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.