In the web app being developed it is necessary to calculate a running total or balance on query being made. I come from an Excel background and this is easy to calculate. I do not have any real DB / SQL experience and I cannot figure out how to do it on OutSystems. Looking to have an output like below
Interested to see how others handled this.
Hi Richard,
I've attached a simple PoC that shows what I mean.
There's no easy, out-of-the-box solution for the above. Databases don't handle running totals very well (see e.g. here). What I'd do to get something like the above, is iterate over the results returned from the Aggregate (with a For Each), and calculate the running balance in the loop.
Thanks that is helpful.
A few dumb questions
Kilian,
Thanks for that. It is very helpful. When I said "previous running balance" I mean the running balance calculated for the previous record. From my original example if I am calculating the running balance for 7/01/2018 I take the running balance for 5/01/2018 (1,220) and add that to the value for 7/01/2018 (400) to get 1,620.
Couple of questions:
Hopefully these are not too basic questions.
Richard
That is exactly what I was after. Thanks very much for your assistance. Much appreciated.
You're most welcome :).