Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ruma_barman
Creator
Creator

Cummulative sum using set analysis

Hi All,

The requirement is find out the cumulative sum of sales monthwise. The expression rangesum(sum(sales),above(sum(sales)) is not working as required.

Input:

MonthYear, Sales
Apr 2018, 1
May 2018, 2
Jun 2018, 3
Jul 2018, 4
Aug 2018, 5
Sep 2018, 6
Oct 2018, 7
Nov 2018, 8
Dec 2018, 9
Jan 2019, 10
Feb 2019, 11
Mar 2019, 12

Output:

MonthYear, Sales, Cumulative
Apr 2018,       1,         1
May 2018,      2,         3
Jun 2018,       3,         6
Jul 2018,        4,         10
Aug 2018,      5,          15
Sep 2018,      6,          21
Oct 2018,       7,          28
Nov 2018,      8,          36
Dec 2018,      9,          45
Jan 2019,      10,         55
Feb 2019,      11,         66
Mar 2019,      12,         78

 

Thanks in advance,

Ruma

1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III


RangeSum(Above(Sum(Sales), 0, RowNo()))

Channa

View solution in original post

1 Reply
Channa
Specialist III
Specialist III


RangeSum(Above(Sum(Sales), 0, RowNo()))

Channa