How do I reference the value of the previous row?

I am creating a weight recording application.
I want to use a virtual column to find the increase/decrease value from the previous record, but it doesn’t work.

LOOKUP([_ROWNUMBER]-1, “log”, “_ROWNUMBER”, “weight”)

I tried the above formula, but it didn’t work.

Solved Solved
0 6 5,391
1 ACCEPTED SOLUTION

Try this:

LOOKUP([_THISROW].[_RowNumber]-1, “log”, “_RowNumber”, “weight”)

View solution in original post

6 REPLIES 6

Try this:

LOOKUP([_THISROW].[_RowNumber]-1, “log”, “_RowNumber”, “weight”)

Wow!
It worked.
Thank you!

Welcome!

It's not working.

Please check

I am building a similar app, and was having a similar problem.  I tried your selected solution, but it was only getting the last row of the table for some reason.  I tried this, and it is seeming to get the job done.

LOOKUP(MAXROW("Measurements", "Weight (lb)", [Date] < [_THISROW].[Date]), "Measurements", "Measurements ID", "Weight (lb)")

Top Labels in this Space