[_THISROW_AFTER].[Meter reading] Value not getting

Hi

I need to get after value of a specific cell and display it, but when I used [_THISROW_AFTER].[Meter reading] shows the same row value.

It doesn’t work with the app formula as there is no source where it would be saved. It was originally designed for Bots when they were triggered and the “before” value was still available.

1 Like

As far as I’ve ever been able to tell, the THISROW_AFTER value is quite pointless, as it is always the same as the current value (which makes logical sense to me). Not really sure what you’re expecting here, can you elaborate?

1 Like
  • [_ThisRow_After] captures the new value after a data change, i.e. it is the same value you are now seeing, if there has been a change. Since you already see the current value, this reference is only useful in comparisons (with [_ThisRow_Before]).
  • I’m not sure you can use this outside an automation (or an automation template).

I thought it was a typo :slightly_smiling_face:

1 Like

Oh and I’ve just seen that you and Marc had answered before me :grinning_face_with_smiling_eyes:

Hi, here i am expecting to get the difference between two cells and the
value need to get seperate cell. This is like meter reading. I am updating
electricity meeter reading daly to meter reding colum, and there is a
another colum Which i need to get the meter reading difference of previous
day reading vs current day reading.

Hi, i need to do the same in app sheet. Need to take the meeter reading different to Difference column.

I need to do the same in app sheet. Need to take the meeter reading different to Difference column.

Sounds like you’ve completely misunderstood the THISROW_BEFORE/AFTER stuff. It doesn’t reference the row that is before/after the current row. It references the same row, but the values from before/after a change. So disregard that completely for this task.

You need an expression that subtracts the reading from the previous record from the current reading.

“Day 1”,“Day 2” is not a good way to record days. Cut those down to just integers 1,2,etc if you want. But better to use actual dates. Then you can lookup the previous row with MAXROW()

Your final expression will be something like:
[reading] - LOOKUP(MAXROW(table,date,[date/day]<[_THISROW].[date/day]),table,id,reading)

https://help.appsheet.com/en/articles/2357309-lookup

https://help.appsheet.com/en/articles/2357310-maxrow