Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Pedro_Rodriguez
Contributor III
Contributor III

Accumulated chart by year

Hi all,

Simplyfing, I have some data like this:

LOAD * INLINE [
    amount, date
    100, 2018/10
    101, 2018/11
    102, 2018/12
    103, 2019/01
    104, 2019/02
    105, 2019/03
    106, 2019/04
];

 And I need a line chart which accumulates by year, that is:

100            201            303             103            207              312             418

2018/10   2018/11   2018/12    2019/01   2019/02    2019/03    2019/04

I have tried something like:

Sum(Aggr(RangeSum(Above(sum(amount), 0, RowNo())),Year(date)))

Bur doesn't work.

Thanks a lot in advance

Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

HI @Pedro_Rodriguez 

Try like below

LOAD *, Left(date,4) as Year INLINE [
amount, date
100, 2018/10
101, 2018/11
102, 2018/12
103, 2019/01
104, 2019/02
105, 2019/03
106, 2019/04
];

Sum(Aggr(RangeSum(Above(sum(amount), 0, RowNo())), Year,date))

MayilVahanan_0-1613638327577.png

 

Thanks & Regards,
Mayil Vahanan R

View solution in original post

2 Replies
MayilVahanan

HI @Pedro_Rodriguez 

Try like below

LOAD *, Left(date,4) as Year INLINE [
amount, date
100, 2018/10
101, 2018/11
102, 2018/12
103, 2019/01
104, 2019/02
105, 2019/03
106, 2019/04
];

Sum(Aggr(RangeSum(Above(sum(amount), 0, RowNo())), Year,date))

MayilVahanan_0-1613638327577.png

 

Thanks & Regards,
Mayil Vahanan R

View solution in original post

Pedro_Rodriguez
Contributor III
Contributor III
Author

Thanks a lot @MayilVahanan