Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
c_pannese
Partner - Creator
Partner - Creator

cumulative sum on years

Hi all,

i have to calculate cumulative sum by month in a linear table and re-starting the sum when the year change.

like this:

yearmonthmeasurecumulative
2010gen66
2010feb713
2010mar518
2010apr826
2010mag228
2010giu634
2010lug640
2010ago747
2010set552
2010ott860
2010nov262
2010dic668
2011gen22
2011feb79
2011mar514
2011apr822
2011mag224
2011giu630
2011lug636
2011ago743
2011set548
2011ott856
2011nov258
2011dic664

 

thank you all

Labels (1)
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

Depending on your data model use RangeSum/Above, so something like

rangesum(above(sum(Amount),0,month(Date)))

20210720_1.png

Cheers,

Chris.

View solution in original post

3 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Depending on your data model use RangeSum/Above, so something like

rangesum(above(sum(Amount),0,month(Date)))

20210720_1.png

Cheers,

Chris.

Akash_Dixit
Contributor II
Contributor II


thanks for sharing the logic, I'm also working on something like that and the logic is working correctly when no selection(s) are made but when a user select particular Month/year the results are non cumulative. Hence giving record only for those for which the selection is made and if there is no value for the particular selection then no value.  

KOS
Contributor
Contributor

Hi @chrismarlow when i follow this format to solve thesame problem, it seems to be accumulating from one year to the next in a graph, unless i filter to a specific year then the numbers are accurate, how can i solve this issue pls?