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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I am trying to calculate the difference between values which are in different rows and columns. When I am trying to calculate I am getting a wrong result. Seems my query calculates difference by values in same row.
Here is my data table example:
My expected result is:
My output result is:
Seems that result is wrong. I expected to 0.87 but I am getting -3289,13. So what's wrong here in my DAX fomula?
My query is here:
Best regards
How you could get the different values from the columns in such an array.
The idea is that I should compare prices between the different production batches and paint red the row that has at least a different price.
Unfortunately, I don't know your calculation logic. The fields in your formula are inconsistent with the sample data you provided, so it's difficult to correctly express what you mean. Please provide a pbix file after deleting sensitive data and the calculation logic you want to implement.
@Analitika , Try these
Calc 1 =
var _1 = maxx(FILTER('Table', [ID] =EARLIER('Table'[ID]) && [CRE]<>0) ,[CRE])
return if([DET] <>0, _1 -[DET])
or
Calc 12 =
var _1 = maxx(FILTER('Table', [ID] =EARLIER('Table'[ID]) && [CRE]<>0 && [DATE] >EARLIER('Table'[DATE]) ) ,[CRE])
return if([DET] <>0, _1 -[DET])
Hello having error
@amitchandak Yes I have tried but is possible to include filter Id like id=500 because there are more rows in data? In the same query I mean.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.