How to Calculate Percentage Change From Last Entry to Most Recent Entry?

Hi Gurus,
Surprising I have not been able to find this on the help docs or community, but what is the expression used to calculate the percentage change from the Last Entry to Most Recent Entry in a Column ?

I know the formulation in google sheets is simple ([Current Entry Num]) - [Last Entry Num] / [Last Entry Num] with a percent field.

There is always a problem with the first entry ever because there is no previous value to refer to. In google sheets I wrap it with an IFERROR(formula, 0 which then leaves a 0% value for the first entry. Is there an equivelant expression in AppSheet?

Thanks!

Not sure how to reference these values.

Thanks in advance!

Solved Solved
1 18 900
1 ACCEPTED SOLUTION

@Tony_Insua
Geez, I now understand your issue. Create a Virtual Column with MAXROW() expression first:

MAXROW("Tablename", "DATE ENTERED")

This Virtual column will return you the reference of the row with the latest entered date in the table where you can use it to dereference the value of the FTP column in the table. Now you can apply below expression for your [FTP % CHANGE] column:

IFS(
    ISNOTBLANK([VirtualColumnName]),
    ([FTP] - [VirtualColumnName].[FTP]) / [VirtualColumnName].[FTP]
)

This will give you the % change of the FTP value as per the lates FTP value in your table. I have also updated my sample app as such, so that you can see it running.


APPSHEET DOCUMENTARY



View solution in original post

18 REPLIES 18
Top Labels in this Space