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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
SMJENSEN
New Member

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 @SMJENSEN ,

 

You can refer to the blog:

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

 

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 @SMJENSEN ,

 

You can refer to the blog:

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

 

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.