Forum Discussion
Difference between two rows
- 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 ) )
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 )
)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.
- htalat63 years agoFrequent Visitor
i am actually looking to find the solution to the same usecase.
Please share if you find out anything