Cumulated expresssions

Romain
New Member

Hi,
I have an app that allows the user to enter all the revenue and expenses for his activity.
I would like to make the evolution of his balance according to the data entered.

For this I have these columns [Date] / [In out] (Enum column) / [Amount].
I can calculate his daily balance by the formula below
SUM (SELECT Follow [Amount], AND ([In out] = โ€œInโ€, [Date] = [_ THISROW]. [Date]))) - SUM (SELECT (Follow [Amount], AND ([In out] = โ€œOutโ€, [Date] = [THISROW _]. [Date])))

but I can not accumulate it over several days
Day 1 = Balance 1
Day 2 = Balance 2 + Balance 1
Day 3 = Balance 3 + Balance 2

To complicate the calculation, the data are not collected chronologically. On Day 3, the user can enter a day 1 data he had forgotten.

Every day the user can return several incomes or/and outcomes or nothing.

Iโ€™m blocking on the formula that would allow me to solve this topic.
Maybe can be done easier in Gsheet but I prefer working on Appsheet formulas if there is a way to do this.
Thanks in advance.

0 5 514
5 REPLIES 5

SUM(
SELECT(Follow[Amount], AND(
[In out] = โ€œInโ€, 
[Date] =< [_ THISROW].[Date]
)))
 - SUM(SELECT(Follow[Amount], AND(
   [In out] = โ€œOutโ€, 
   [Date] =< [_THISROW].[Date]
   )))

It is incredible how a symbol โ€œ<โ€ make a difference !!!

How I didntโ€™t think about it, I have tried so many thing and the answer was just to change โ€œ=โ€ by โ€œ=<โ€

Thank so much!

Youโ€™re welcome!

You wouldnโ€™t beleive how many hours (yes HOURS) have been spent pouring over a huge formula to figure out whatโ€™s wrong - only to find there was a single comma missing!

2X_c_c0475162c64752b24a2034a9bd02c7f681e943da.gif

Me salvou amigo.

Top Labels in this Space