Forum Discussion
Anonymous
7 years agoNot applicable
Calculate elapsed time between rows
I have a date/time column in my table. I want a new column that will calculate the elapsed time in minutes between rows. For example, the first row in the new column based on data in the screenshot...
- 7 years ago
you can use advice from ImkeF on how to reference previous row in M
https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-power-query-or-power-bi/then you can just subtract one column from another, set its type to duration and remove the previous date column
Stachu
7 years agoCommunity Champion
you can use advice from ImkeF on how to reference previous row in M
https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-power-query-or-power-bi/
then you can just subtract one column from another, set its type to duration and remove the previous date column