Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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!
Hi @Monami
Please try
=
SUMX (
VALUES ( Conso[Product] ),
( [Price per KG - Actual] - [Price per KG - Budget] ) * [Sum of RM Weight Sold ADJ M (2023)]
)
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 🙂
Proud to be a Super User!
hope this is clear enough
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.
Proud to be a Super User!
You have to use sumx:
https://radacad.com/sum-vs-sumx-what-is-the-difference-of-the-two-dax-functions-in-power-bi
Proud to be a Super User!