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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kaktusit0
New Member

DAX summarize measures from two tables even when there is no match in one of them

I'm new with DAX and I need some help with a measure.

 

I want to group data by month, product, group and store, and summarize quantity and goals.

These are a sample of my tables:

Stores table

Storegroup
1XX
2XX
3YY

Targets table

MonthStoreProductGoal
feb 211A5
feb 211B7
feb 212A8
feb 212B7
feb 213A6
feb 213B10

Sales table

DateStoreProductQuantity
feb 1, 211A2
feb 2, 211A5
feb 5, 211B3
feb 5, 212A1

 

I need something like this, filtered by month.

Sum all goals even if there are no sales for some stores yet.

Feb 21

ProductGroupStoretotal Quantitytotal Goal
A 6819
 XX3813
  175
  218
 YY3 6
  3 6

 

I don't have problems if there are some sales for the store, but when a store doesn't have any rows in the sales table, the total goal colum isn't correct.

This is the result I have, the total goal of product A in feb 21 (13) is wrong.

Feb 21

ProductGroupStoretotal Quantitytotal Goal
A 6813
 XX3813
  175
  218
 YY3 __
  3 __

 

Can anyone help me with this issue?

Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kaktusit0 , Create a common table of product and join with both tables and then you should be able to analyze

 

Common tbale

https://www.youtube.com/watch?v=Bkf35Roman8

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@kaktusit0 , Create a common table of product and join with both tables and then you should be able to analyze

 

Common tbale

https://www.youtube.com/watch?v=Bkf35Roman8

 

Thanks a lot @amitchandak for your answer.

It was a really simple solution 😊

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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