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
Anonymous
Not applicable

Calculation groups using 2 measures for Selectedmeasure() possible?

Hi all,

 

I have a challenge applying calculation groups that I hope you can help me with. I have attached a snapshot of my data set below:

 

SMJENSEN_0-1641991119517.png

 

 

The version columns tell us if the numbers are actual values or budgeted numbers. The actual/outlook columns tell us if the value is an actual number, our latest forecast (Outlook), or the forecast we made last month (Outlook LM).

 

So I have a measure picking up Actual/Outlook numbers compared to a comparison measure that picks up budget numbers, actuals from the past years, or the Outlook that was made last month. Currently, I am using switch functions to pick a measure that selects values based on the version. It looks like the below, including the output table

 

Actual/Outlook measure=

 

  CALCULATE (

        SUM ( Financials[Value] ),

        OR (

            Financials[Actual/Outlook] = "Actual",

            Financials[Actual/Outlook] = "Outlook"

        ))

 

Comparison Selection =

SWITCH (

    TRUE (),

    'Metric Selection Comparison'[Metric Select Comparison] = "Last Year", 'Metric Selection Comparison'[Comparison_Lastyear],

    'Metric Selection Comparison'[Metric Select Comparison] = "Budget", 'Metric Selection Comparison'[Comparison_Budget],

    'Metric Selection Comparison'[Metric Select Comparison] = "Outlook LM", 'Metric Selection Comparison'[Comparison_OutlookLM],

    0

)

 

With budget being: CALCULATE ( SUM ( Financials[Value] ), Financials[Version] = "Budget" )

 

 

Output:

SMJENSEN_1-1641991119519.png

 

 

 

 

This way works, but it reduces performance a bit. However, I was told about calculation groups and saw the potential for boosting my model performance. So I created a calculation group for versions that considers my three scenarios; Budget, Last Year, and Outlook LM. It works perfectly when I use the calculation group for the comparison measure in the slicer. However, my actual measure doesn’t work anymore, and no matter what I do, it returns the exact same value as my comparison measure. Below are my two measures.

 

Acutal:    CALCULATE (

        SUM ( Financials[Value] ),

        all(Financials),

        OR (

            Financials[Actual/Outlook] = "Actual",

            Financials[Actual/Outlook] = "Outlook"

        )

     )

 

Comparison tester =

sum(Financials[Value])

 

 

 

This makes me wonder if two measures can co-exist with the calculations group and, if so, how to manage it.

 

 

Thank you in advance

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can refer to the blog:

https://community.powerbi.com/t5/Community-Blog/Using-a-slicer-to-show-different-measures/ba-p/1724504 

 

Best Regards,
Liang
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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can refer to the blog:

https://community.powerbi.com/t5/Community-Blog/Using-a-slicer-to-show-different-measures/ba-p/1724504 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bcdobbs
Community Champion
Community Champion

If I'm understanding the problem correctly...

 

The moment a calculation group is in use in a visual every measure gets pushed through it.

 

To display the original value of the plane measure as well you need to add an extra calculation group item which is simply SELECTEDMEASURE()



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

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.