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.
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!
Me salvou amigo.
User | Count |
---|---|
44 | |
28 | |
28 | |
21 | |
13 |