Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Need your help in getting the cumulative totals in line chart.
I have years from 1920 to 2015. And my requirement is if i select year 2015 the line chart should display years 2015,2014,2013,2013 and the expression should display the accumulative totals from 1920.
ex for 2015 it should display sum of sales from 1920 to 2015 and for 2014 it should display sum of sales from 1920 to 2014.
Please help on this
Thanks
Nani
sorry my mistake if i select year 2015 it should display 2015,2014,2013,2012
Thanks
Try something like this:
Sum({<Year= {">=Min(Date) <= ($=(Max(Year))"}>} Sales)
maybe
sum({$ <year={">=$(=max(year)-4)<=$(=max(year))"}>} aggr(rangesum(above(total sum({<year=>}sales),0,rowno())),year))
testdata:
load
1920-1 + rowno() as year,
1 as sales
AutoGenerate 96;
Hi,
you can try something like this. PFA the QVW file. !
Hi ,
you see use range sum to accumulate the values.
See below example of rangesum
Thanks
BKC