Forum Discussion
Subtracting the rows in Query based on a specific column
- Anonymous5 years ago
Add an index from 0, then create the following custom column, and remember replace error and change data type.
if ([Meter] = #"Added Index"{[Index]+1} [Meter]) then ([Reading]- #"Added Index"{[Index]+1} [Reading]) else ""Check attached pbix for detail.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Add an index from 0, then create the following custom column, and remember replace error and change data type.
if ([Meter] = #"Added Index"{[Index]+1} [Meter]) then ([Reading]- #"Added Index"{[Index]+1} [Reading]) else ""
Check attached pbix for detail.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
- Alirezam5 years agoHelper V
Hi,
This solution is so clever and I used it in Power query however, exactly the same 'step' seems not to work in 'dataflow' and the 'new column' returns 'error'. any idea why the same command does not work in dataflow? thanks