Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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 (1)
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
Please close the thread by marking correct answer & give likes if you like the post.

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
Please close the thread by marking correct answer & give likes if you like the post.
Pedro_Rodriguez
Contributor III
Contributor III
Author

Thanks a lot @MayilVahanan