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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Hakuraki
New Member

How to create this measure with a fixed denominator

Hello community,

I am very new to DAX and I would like to create a measure that I use in one of my excel reports that I am trying to migrate to PowerBi.

This is my measure right now:

Hakuraki_1-1760434603656.png

 

It is straight forward -- It is supposed to divide the Dynamic Measure (for example Value Sales) for selected "CustomerX". I have a slicer for Market that is filtering the Dynamic Measure. So for example the Numerator should calculate Value Sales in MarketX for CustomerX. The Denominator should calculate the Value Sales for CustomerX but in Total Market specifically.

Now comes the tricky part. The "Total Market" is part of the Market Table as are all the other markets. This is kind of unlucky, this is how we are recieving our data. We have all the markets together in the data, so the Total Market is just another market in the table. It does not necessarily mean that the Total Market is sum of other markets either.

The measure obviously does not work. Or rather works just for the Total Market which gives 100%. Is there a workaround this issue? I need to select other markets through the slicer without changing the denominator context.

Thank you for your help!

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Share some sample data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-pnaroju-msft
Community Support
Community Support

Hi Hakuraki,

We are following up to see if what we shared solved your issue. If you need more support, please reach out to the Microsoft Fabric community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Thankyou, @FarhanJeelani for your response.

Hi Hakuraki,

We appreciate your inquiry through the Microsoft Fabric Community Forum.

We would like to inquire whether have you got the chance to check the solution provided by @FarhanJeelani to resolve the issue. We hope the information provided helps to clear the query. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

Thank you.

FarhanJeelani
Super User
Super User

Hi @Hakuraki ,

You need the denominator to stay fixed on “Total Market” even as the Market slicer changes the numerator. Do that by explicitly fixing the Market context for the denominator while letting the numerator react to slicers.

 

Keep the numerator as your current dynamic measure (Value Sales for the selected Customer in the selected Market).
Create a denominator measure that ignores the Market slicer but still respects the Customer filter.


A practical pattern (adapt to your model):

Denominator (example ideas — pick one that fits your schema):


Ignore market but keep the customer: CALCULATE( [Dynamic Measure], REMOVEFILTERS('Market') )

If you need to force “Total Market” specifically, you can add a filter: CALCULATE( [Dynamic Measure], FILTER( ALL('Market'), 'Market'[Market] = "Total Market" ) )


If you have to ensure the customer stays filtered (e.g., via slicer): CALCULATE( [Dynamic Measure], REMOVEFILTERS('Market') ) -- plus make sure the Customer filter keeps its context (usually by default)

 

A complete, drop-in pattern

HakurakiRatio = VAR Num = CALCULATE( [Dynamic Measure] ) -- this uses current Market + Customer VAR Den = CALCULATE( [Dynamic Measure], FILTER( ALL('Market'), 'Market'[Market] = "Total Market" ) )


RETURN IF( NOT ISBLANK(Num), DIVIDE(Num, Den) )

 

Please mark this post as soulution if it helps you. Appreciate Kudos.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.