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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
AlexanderNN
Frequent Visitor

Change measure default behavior with calculation groups

Hey guys,

I just got a request to change the default behavior of all our measures in Power Bi and was wondering if any of you have any good tips before I start breaking everything 😅 

We have a central semantic model for our Sales data. What I want to to is alter the dafult calculations for a lot of measures. This is a a very simple measure which calculates our Order Inflow:

CALCULATE(
    SUM( 'Fact Order'[OrderinflowAmount] ),
    'Fact Order'[IsCancelled] = 0
)

We've recently acquired some companies and have mapped their historical sales to our channels (which is different websites) and I did this Calculation Group to alter the behavior of measures.

OnlyGroupSales: = CALCULATE(
    SELECTEDMEASURE( ),
    'Dim Order Source'[Channel] <> "OLD"
)

AllSales :  CALCULATE(
    SELECTEDMEASURE( )
)

The request is now to have the "OnlyGroupSales" as the default calculations for our measures. There are roughly 50 measures that I want to change the default behaviorof. I also want to have the ability to switch between the "AllSales" behavior and "OnlyGroupSales" behavior. 

Is this possible using calculation groups or do I have to change all individual measures and create a new calculation group that does the inverse of my OnlyGroupSales? I thought this would be an easy fix, but perhaps it is not possible. Any suggestions would be greatly appreciated 🙂 

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

There's nothing I'm aware of that would do this. I think the solution is to change the reports. 

View solution in original post

3 REPLIES 3
mark_endicott
Super User
Super User

There's nothing I'm aware of that would do this. I think the solution is to change the reports. 

mark_endicott
Super User
Super User

If "OnlyGroupSales" and "AllSales" are calculation items within the same Calculation Group, then you can use a slicer or the filter pane to select "OnlyGroupSales" as the default, by having this selected when you share/publish the report, and users will be able to switch to the AllSales by using the filter. 

 

Sorry if I'm missing something and oversimplifying.  

Based on the description you aren't missing something. However, this model has around 10 reports tied to it and I am curious if it is possible to change the default behavior in the model instead of having to edit all reports. 

So your solution is the fallback solution if there's no other way.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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