Duration Between rows

Hi everyone, Im trying to calculate de duration between the value in a new row and the last one.

i’ve been trying this formula

([_THISROW].[Horas Totales])-(INDEX(Reservorio[Horas Totales],COUNT(Reservorio[Horas Totales])))

Horas Totales" column is always an increasing value

thank you in advance

For a table like this (I call it LOGS2), assuming [clock_time] is always in ascending order

You set the Initial Value expression to [time_elapsed]

[hours_total] -
ANY(SELECT(LOGS2[hours_total],
 [id]=MAXROW("LOGS2","clock_time")
))
2 Likes

Thanks! that worked!

1 Like