I am trying to implement an interactive report based on refreshing dynamics actions where a user can check the current visits per month and year for different accounts. He can select the data via a popup lov for the months and the year.
I'd like to implement a column where the running total is displayed by months for every account
For instance the number of visits for account01:
What I want to achieve is a running total by month and year filtered
February: 350 (Jan + Feb)
March: 400 (Jan + Feb + Mar)
I tried this with the following SQL Query where I managed to get the total for every month and for every individual account but the cumulative sum for the next months is not working.
The data gets refreshed after another month is selected via the Popup LoV
sum(count(*)) OVER (PARTITION BY user_account, to_char(year, 'YYYY'), to_char(month, 'MM') ORDER BY to_char(year, 'YYYY'), to_char(month, 'MM'),user_account)
Any idea on how I can display the cumulative sum by the months.
Appreciate your help.