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 ) )
Anonymous
7 years agoNot applicable
Hi Zubair_Muhammad,
Congrats for the solution.
Can I take ask for a complementary demand on the same idea?
As the original demand, I need to execute the difference between two dates located in different rows, but I need to consider a key. It is something like this:
Key Date
1 01/08/2018
1 12/09/2018
1 05/10/2018
2 02/07/2018
2 16/08/2018
Thanks a lot in advance.
Regards.
htalat6
3 years agoFrequent Visitor
i am actually looking to find the solution to the same usecase.
Please share if you find out anything