Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
axana___
Contributor
Contributor

cummulative sum bar chart for last 12 months

Hi, 

I have a problem regarding rangesum. I have a code working for 1 month but I need a chart where previous 11 months are also displayed.

The code I am using: Aggr(RangeSum(Above(Sum(Bedrag), 0, RowNo())),Year, Month)

What I want to achieve if I select April 2018:

may 2017sum from january 2017 till may 2017
june 2017sum from january 2017 till june 2017
july 2017sum from january 2017 till july 2017
august 2017sum from january 2017 till august 2017
september 2017sum from january 2017 till september 2017
october 2017sum from january 2017 till october 2017
november 2017sum from january 2017 till november 2017
december  2017sum from january 2017 till december 2017
january 2018sum from january 2018 till january 2018
february 2018sum from january 2018 till february 2018
march 2018sum from january 2018 till march 2018
april 2018sum from january 2018 till april 2018

 

Labels (1)
2 Replies
Channa
Specialist III
Specialist III

try may help

RangeSum(Above(Sum({<CGL_Year={$(=Year(Today())-1)}>}[Processed Policies]), 0, RowNo()))

or

=aggr(RangeSum(above(Sum({<CGL_Year={$(=Year(Today()))}>}[Processed Policies]),0,RowNo())),CGL_Month)

CGL_Month is my chart Dimension

 

i am using this for last year range sum, try edit bold one to show last 12 months

 

if you have date try something like below for last 12 months in place of bold

=Sum({$<[Ship Date]={">=$(=MonthStart(Today(),-12))<$(=monthend(Today(),0))"}>}Sales)

Channa
axana___
Contributor
Contributor
Author

Sadly not working for me. The displayed values in the chart are not correct. I only get correct values when I select 2019 but then the chart is only displaying 2019 and not the other months of 2018.