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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Issue with SUMX function

Hi,

I used sumx, hence i supposed to get sum of sales and extended amounts in last coulmn. However, i seeing something else. Can someone help on it. Thanks.

 

RamaKrishna8989_0-1668604890113.png

add measure = sumx(FactInternetSales, FactInternetSales[SalesAmount] + FactInternetSales[ExtendedAmount])
2 ACCEPTED SOLUTIONS
Syndicate_Admin
Administrator
Administrator

Hello!

I see that you are adding the data using FactInternetSales as context, which means that it will go row by row in that table doing the operation you indicated, to see that result modifies the type of summarization that the columns of ImporteVentas and ExtendedAmount have

Sandielly_0-1668607093794.png

View solution in original post

Hello, it is the same as I explain, everything depends on the filter context, when you remove the Sales order number everything is damaged because you removed the context from the matrix and therefore it is adding the data, basically it is adding all the 2.9 and it is adding them. This happens because you are directly using the columns with the measurements without a correct filter context.

If this post is helpful in helping you solve your problem, consider giving the post a thumbs up

and accept it as a solution!

View solution in original post

7 REPLIES 7
serpiva64
Super User
Super User

Hi,

as you can see there is nothing wrong in your measure

serpiva64_0-1668607310833.png

it is only grouping all sales with the same amount.

 

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

Hey, if my query is correct. can you pls me understand why am i seeing huge values in add measure column, while you are getting the correct 4.58 values in add measure? 

Hello, it is the same as I explain, everything depends on the filter context, when you remove the Sales order number everything is damaged because you removed the context from the matrix and therefore it is adding the data, basically it is adding all the 2.9 and it is adding them. This happens because you are directly using the columns with the measurements without a correct filter context.

If this post is helpful in helping you solve your problem, consider giving the post a thumbs up

and accept it as a solution!

Hi, Can you also help me understand in detailed steps, at least for the first row, how is it calculated as 14614??

Calculated correctly after adding salesordernumber column to the table. Thank you 

Syndicate_Admin
Administrator
Administrator

Hello!

I see that you are adding the data using FactInternetSales as context, which means that it will go row by row in that table doing the operation you indicated, to see that result modifies the type of summarization that the columns of ImporteVentas and ExtendedAmount have

Sandielly_0-1668607093794.png

Hey,

I already selected don't summarize only. yet i am still seeing incorrect values.

 

RamaKrishna8989_0-1668614943506.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.