How to get the value of the cell above to use in math calculation

Hi,

I am trying to write an expression for a column that uses the value of the cell above if it exists and if its a number.  Here is the AppSheet translation of the working Google Sheets formula.  

IF(ISNUMBER(R[-1]C), R[-1]C, 0) - RC[-2] + RC[-1]

Is something like this possible?  I would be fine leaving it in Google Sheets but the table breaks if a row is deleted since it doesn't delete the actual row in Google Sheets and only deletes the values.  

The gist is that a record either removes something from an inventory number or adds to it.  

Thank you!

 

0 1 421
1 REPLY 1

It's possible but whereas it would be very easy in a spreadsheet it's a little harder in AppSheet.  What is the context?  Is this a situation where you can build an action that does this only when necessary or do these calculations need to be updated constantly throughout the table as they would be in a spreadsheet?  If you are thinking of the latter, I would say you might want to think of another strategy because the expression you would need would wind up being quite expensive.  The reason for the "expense" (heavy calculating demand) is that you would need to use as a SELECT() expression in a virtual column.  If you have a lot of data, that can make your app really sluggish.

P.S.  Looking at your formula made me wonder if this is only for new records.  Is that the case? If so that might be easier.

Top Labels in this Space