Date | Income |
---|---|
03/12/2023 | $400 |
03/19/2023 | $200 |
03/21/2023 | -$200 |
04/02/2024 | $500 |
05/18/2024 | $350 |
05/22/2024 | -$100 |
05/31/2024 | -$25. |
I need some guidance on how to use query function to generate running total for above table. The table needs to be grouped by end of the month based on the year (Pivot for the year).
thanks in advance.
=query({Arrayformula('Cash-Flow'!$A$1:$B), Arrayformula(EOMONTH('Cash-Flow'!$A$1:$B,0)),Arrayformula(MONTH('Cash-Flow'!$A1:$B))}, "SELECT MONTH(Col1)+1, MAX(Col2) group by MONTH(Col1)+1 PIVOT YEAR(Col1)", 1)
This only works within the boundary of the month and does not carry the running total to the next month.
New contributor
Wonderer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.