HI i am trying to build a form for an everyda...

(Laura Ramazzotti) #1

HI i am trying to build a form for an everyday income and expenses

i have table acount name cash and Column date, income ,expenses and balance so in the App formula balance i need to get new balance

= balance + ({income}-{expenses}) but it s not working how can i have the previews balance plus the income or minus the expenses in my formula ?

(Praveen Seshadri (AppSheet)) #2

@Laura_Ramazzotti, a table in AppSheet does not have an order, unlike a spreadsheet. So there is no notion of “previous”. Instead, you will want to identify the most recent row by using the MAXROW() function in a virtual column.

See help.appsheet.com - List Expressions and Aggregates and look for MAXROW().

In your case, you will need a virtual column called MostRecentRow with app formula MAXROW(“Account”, “date”) And then for the balance, use this app formula: [MostRecentRow].[balance] + [income] - [expenses] List Expressions and Aggregates help.appsheet.com