Forum Discussion
SSS
8 years agoHelper I
Difference between two rows
Hi, I need help in order to solve a problem trying to calculate the differences between two rows in Power BI. My tables look like: Date Orders Index 01/01/2017 85...
- 8 years ago
Hi SSS
Using DAX you can add this calculated column to get desired results
= VAR NextIndex = Table1[Index] + 1 RETURN Table1[Orders] - CALCULATE ( VALUES ( Table1[Orders] ), FILTER ( ALL ( Table1 ), Table1[Index] = NextIndex ) )
mbelal
5 years agoRegular Visitor
Hi Ashish, thanks for your support. appreciated.
your solution works fine for the import data but i have direct query data so i cannot add a custom column to do what you adviced, i believe i need the same formula on the power query. i appreciate your support. thanks.
Ashish_Mathur
5 years agoSuper User
You are welcome. Someone else will help you with that.