Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
campelliann
Post Patron
Post 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 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...

 

1 ACCEPTED SOLUTION
Anonymous
Not 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. 

View solution in original post

1 REPLY 1
Anonymous
Not 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. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.