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
DataSundowner
Helper II
Helper II

DAX to Calculate Sum Ignoring a Column

Hello Community. I need some help to build a DAX measure that calculates sum of sales for total region regardless of store being filtered. It sounds pretty straight forward, but my model is a little bit tricky since I have a Store Map table that has multiple map styles for each region, and I need the relationship between the Map table and Store table to be bi-directional so they can filter each other. I've tried many different ways, but yet to find a final solution that returns the results I want. I can't seem to attach the sample pbix file here, but below are the screenshots of data and model. Thank you in advance. 

 

Model:

DataSundowner_0-1737843956165.png

 

 

Data 1: Sales

DataSundowner_1-1737843392882.png

 

Data 2: Store

DataSundowner_2-1737843424254.png

 

Data 3: RegionStoreMap

DataSundowner_3-1737843451631.png

 

Report View:

DataSundowner_4-1737843503975.png

 

Current Measure:

DataSundowner_5-1737843530446.png

 

Desired Results: 

DataSundowner_0-1737843101894.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @DataSundowner ,

 

I suggest you to try code as below to create a measure.

 

Sales - Region Total = 
CALCULATE(SUM(Sales[Sales]),REMOVEFILTERS(RegionStoreMap[MapStoreID]),Store[RegionID] in VALUES(Store[RegionID]))

 

Relationship in my sample:

vrzhoumsft_1-1737958415267.png

Result is as below.

vrzhoumsft_0-1737958351673.png

 

Best Regards,
Rico Zhou

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi @DataSundowner ,

 

I suggest you to try code as below to create a measure.

 

Sales - Region Total = 
CALCULATE(SUM(Sales[Sales]),REMOVEFILTERS(RegionStoreMap[MapStoreID]),Store[RegionID] in VALUES(Store[RegionID]))

 

Relationship in my sample:

vrzhoumsft_1-1737958415267.png

Result is as below.

vrzhoumsft_0-1737958351673.png

 

Best Regards,
Rico Zhou

 

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

It works perfect. Thank you very much, Rico! 

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
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.