cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Incorrect Measure Row Total using CALCULATE SUMX

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User IX
Super User IX

Re: Incorrect Measure Row Total using CALCULATE SUMX

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Frequent Visitor

Re: Incorrect Measure Row Total using CALCULATE SUMX

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

 

Capture1.JPG

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors