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

Incorrect Measure Row Total using CALCULATE SUMX

 

Hi. Can you help me find out what could be wrong here. I used below to calculate the Total Sales LP, but the result of those highlighted in yellow are not correct. Thank you in advance

 
Total Sales LP = CALCULATE(sumx(Data_Ship,[Total Sales Qty]*Data_Ship[SalesLP]))

 

Capture.JPG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Maricon , [Total Sales Qty] is the measure, does it belong to Data_Ship?

if not then force a row context

 

Total Sales LP = CALCULATE(sumx(values(Data_Ship[Actual ship date]),[Total Sales Qty]*Data_Ship[SalesLP]))

 

This need to some level where multiplication should be correct, not [Actual ship date]

 

See row context play a role here : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Maricon , [Total Sales Qty] is the measure, does it belong to Data_Ship?

if not then force a row context

 

Total Sales LP = CALCULATE(sumx(values(Data_Ship[Actual ship date]),[Total Sales Qty]*Data_Ship[SalesLP]))

 

This need to some level where multiplication should be correct, not [Actual ship date]

 

See row context play a role here : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

@amitchandakThank you so much. Looks like it works, Let me try also to my other files. Thank you again!

 

Capture1.JPG

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.