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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Monami
New Member

Total of new measure does not sum correctly

Hi!

I'm new to DAX, and am trying to create a formula that will calculate the price deviation, but the total does not sum the rows, but instead returns the calculated result on the total. 

This is what i'm using:

=([Price per KG - Actual] - [Price per KG - Budget]) * [Sum of RM Weight Sold ADJ M (2023)]

 

Please help!

6 REPLIES 6
tamerj1
Super User
Super User

Hi @Monami 
Please try

=
SUMX (
    VALUES ( Conso[Product] ),
    ( [Price per KG - Actual] - [Price per KG - Budget] ) * [Sum of RM Weight Sold ADJ M (2023)]
)
Monami
New Member

thanks Andhiii,

I added the SUMX, but it uses the underlying data. is there any way for the formula to calculate the formula based only on the table presented ? (without the underlying) 

 

Please make a example table, your current measure, the wrong result and what you want 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




hope this is clear enough

 

Monami_0-1677655244077.png

 

Can you please show the underlaying table? Some data record would be great, are there more rows with repeting price budget and actual? Than you have to use maxx or minx.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




andhiii079845
Solution Sage
Solution Sage

You have to use sumx:
https://radacad.com/sum-vs-sumx-what-is-the-difference-of-the-two-dax-functions-in-power-bi





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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