Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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))
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))
Thanks a lot @MayilVahanan