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
Dimi123
Frequent Visitor

Wrong Sum totals when using a SUM measure from two different Tables

Hi,

 

I have 2 calculated measures from 2 different tables:

 

- first measure: CALCULATE([Uitgifte in eenheid], DATESBETWEEN(Kalender[Dagen], NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE(Kalender[Dagen]))), LASTDATE(Kalender[Dagen])))

- second measure: CALCULATE ([Kostprijs],LASTNONBLANK ( Kalender[Dagen], CALCULATE([Kostprijs)))

 

I have a third calculated measure that use these 2 measures: [first measure:]*[second measure]

 

Problem is that the total of this measure = sum([first measure])*sum([second measure]) not sum([first measure]*[second measure]).

 

I can not use SUMX because the measures are in 2 different tables ....

 

Can anyone help?

 

Thanks.

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@Dimi123

 

You can still use SUMX(). You just need to create the SUMX() on the dimension table which will slice these two measures. For example, if you want to analyze this measure on Date level, you should write your measure like: 

 

=SUMX('DimDate',[Measure1]*[Measure2])

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@Dimi123

 

You can still use SUMX(). You just need to create the SUMX() on the dimension table which will slice these two measures. For example, if you want to analyze this measure on Date level, you should write your measure like: 

 

=SUMX('DimDate',[Measure1]*[Measure2])

Regards,

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.