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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jayjay0306
Helper III
Helper III

DAX measure across multiple tables

Hi experts,

I hope you can help me with a challenge:

I have the following datamodel (simplified): 

 

jayjay0306_0-1701264301291.png

 

 

In a report I can make a visualization which shows the following:

Capture3.PNG

 

But I need to make a DAX measure, which shows the following:

jayjay0306_2-1701264301292.png

 

 

Now, the example is simplified!

 

There is a twist: The problem is I need to sum it on customer BEFORE I sum the “sale per customer” by brand!!

 

Without adding the customer from the "customer dimension".

 

I have tried the following:

 

Sale by Brand = SUMX(SUMMARIZE(Customer,Customer[Customer Name],"Sale_",CALCULATE(SUM[Sale],CROSSFILTER('Product'[PRODUCT_KEY],'Sales North'[PRODUCT_KEY],Both)), CROSSFILTER('Product'[PRODUCT_KEY],'Sales South'[PRODUCT_KEY],Both))),[Sale_])

 

 

But the outcome is "100%" on all brands?

 

Can you crack the problem?

 

It will be much appreciated.

 

Br,

Jayjay0306

 

1 ACCEPTED SOLUTION
jayjay0306
Helper III
Helper III

thanks Fowmy, I did what you suggested and it works. 🙂

br,

Jayjay0306

View solution in original post

5 REPLIES 5
jayjay0306
Helper III
Helper III

thanks Fowmy, I did what you suggested and it works. 🙂

br,

Jayjay0306

Fowmy
Super User
Super User

@jayjay0306 

Sorry,  did not get it. Since you have the relationships done correctly, 

In a matrix, you can simply add product brand and the measure like 
Sales Measure = SUM( F_Slaes_North[Sales] ) + SUM( F_Slaes_South[Sales] ) 


Am I missing something here?



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy I have a very similar problem, and I'm using your solution and it works. 

My very simple DAX: 

Total installed = [Count G]+[Count H]
Count G = COUNTROWS('Project G')
Count H = COUNTROWS('Project H')
 
And I have a "Project Dim" table recording all the Project Name, equal to their respective Table Name as well. All the Project Table is very simple with same structure.
Tom_Y_0-1703236081466.png
Tom_Y_1-1703236273793.png

 

Instead of 2 projects, the problem is we're going to have 20 projects, and new projects every month. My question is there any way to simply refer to this 'Project Dim' Table and get the name so I dont' need to hardcode it in DAX? (Or is it just normal practice in BI world, keep updating DAX for new project?) Thanks in advance.

Hi Fowmy,

Yes, I understand your question, but this is the twist I am referring to. 

The problem is, that there may be - according to my datamodel - a Product_key column in the "F_Sales_South", but it has no key values. So the only sales split I can make on "F_Sales_South" is on "Customer_key". On "F_Sales_north", however, I have both Product_key and Customer_key on "F_Sales_North" (I know the "Sales_South" won't be split on brand, but I need the sales (volume) in the calculation anyway) .

Therefore, What I am trying to accomplish is somehow to:

1)  sum the "Sales South" + Sales North" to "Sales Total" by customer ID

2) split the "Sales Total"  by brand, using the product/customer relation, which I have in the "F_Sales_North" table.

 

If I combine the "Sales Total" with Brand and Customer in a visualization (plesase see my picture above), I get the correct result. But that is due to the Brand/customer context/combination in the visualization. I need the same result WITHOUT adding the customer ID.

 

Does it make sense? (I admit it is not 100% the logic I have shown in the data model, but I was hoping to get some "inspirational" replies, which I can use to solve the rest, due to the recognition, that the true setup is to hard to explain 🙂 ).

But if you have any ideas on how to solve this, it will be greatly appreciated.

thanks.

 

Br,

Jayjay0306   

 

 

 

@jayjay0306 

If you need to split the sales by brand then you need to have both the fact tables at the granularity of Customer and Product or at least the brand. in your case only one table has both and the other has only customer. 

How do you want the sales of F_Sales_South to split by Brand?I mean what should be the basis to split?

You may also share a dummy PBI file with data  along with the logic.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors