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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
DavidNunes7
Helper I
Helper I

SUM Measure ignoring the locality filter context

Hey guys

I'm having trouble creating a measure that meets the following requirements:

I have a table view with production and target data for each location

I have a measure that calculates the gap (real - target) and makes the calculation weighted in relation to the total volume

 

 

Measure_GAP:
var gap = SUM('table'[real]) - SUM('table'[goal])

return SUM('table'[real]) * gap/ CALCULATE(SUM('table'[real]),ALL(table[local]))

 

 

I need to create a new measure that will return the sum of each line of Measure_GAP but ignoring the locality filter context

As per the example below


Sem título.png

 

 


thank you all for your attention

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @DavidNunes7 ,

 

You can produce your required output in many ways, and one of them is as follows.

First, sumx your original measure over Local field as shown below to get the total of -0.875.  

DataNinja777_1-1715485947082.png

The next, write a second measure like below to ignore filter of Local field.  

DataNinja777_2-1715486015557.png

I attach a pbix file as an example.  

Best regards,

 

View solution in original post

3 REPLIES 3
DataNinja777
Super User
Super User

Hi @DavidNunes7 ,

 

You can produce your required output in many ways, and one of them is as follows.

First, sumx your original measure over Local field as shown below to get the total of -0.875.  

DataNinja777_1-1715485947082.png

The next, write a second measure like below to ignore filter of Local field.  

DataNinja777_2-1715486015557.png

I attach a pbix file as an example.  

Best regards,

 

Perfect!!!
Thank You 

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.