Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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...
Solved! Go to Solution.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |