# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
New Contributor III

## add up daily values in a column and get cumulative sum column

Hi Team,

I have a table like this with only daily number. I want  insert a 'cum' column which has daily values added up till date.

 Date dailyno Cum 07-01-2017 10 10 07-02-2017 20 30 07-03-2017 40 70 07-04-2017 30 100 07-05-2017 20 120 07-06-2017 30 150 07-07-2017 20 170 07-08-2017 10 180 07-09-2017 40 220 07-10-2017 20 240

rangesum(above(dailyno),0,rowno())) did not work for me.

Here is how I tried this.

date,

dailyno

(qvd);

I have loaded extra coloumn, it did not work

date,

dailyno,

rangesum(above(dailyno),0,rowno()))

(qvd);

The help is appreciated. Thank you.

1 Solution

Accepted Solutions
Highlighted
Honored Contributor II

## Re: add up daily values in a column and get cumulative sum column

Hi,

Try like below,

Data:

Date,

dailyno,

RangeSum(dailyno, Peek('CumSum')) AS CumSum;

Date, dailyno,

07-01-2017, 10

07-02-2017, 20

07-03-2017, 40

07-04-2017, 30

07-05-2017, 20

07-06-2017, 30

07-07-2017, 20

07-08-2017, 10

07-09-2017, 40

07-10-2017, 20

];

11 Replies
Highlighted
Honored Contributor II

## Re: add up daily values in a column and get cumulative sum column

Hi,

Try like below,

Data:

Date,

dailyno,

RangeSum(dailyno, Peek('CumSum')) AS CumSum;

Date, dailyno,

07-01-2017, 10

07-02-2017, 20

07-03-2017, 40

07-04-2017, 30

07-05-2017, 20

07-06-2017, 30

07-07-2017, 20

07-08-2017, 10

07-09-2017, 40

07-10-2017, 20

];

Highlighted
Contributor III

## Re: add up daily values in a column and get cumulative sum column

Hi,

Above function works in charts only. If you want it there,

Try like this

Rangesum(

Above (

DailyNo, 0, rowno()

)

)

Highlighted
Not applicable

## Re: add up daily values in a column and get cumulative sum column

In front end use this expression

rangesum(above(total dailyno,0,RowNo(total)))

Highlighted
Partner

## Re: add up daily values in a column and get cumulative sum column

Try This expression

RangeSum(Above (Total Sum(dailyno),0,RowNo(Total)))

Highlighted
MVP

## Re: add up daily values in a column and get cumulative sum column

Hi,

This seems ok on the script you can check this

date,

dailyno,

Rangesum ( Above( dailyno ), 0 , Rowno( ) ) ) as CummDailyNO

(qvd);

Regards

Anand

Highlighted
New Contributor III

## Re: add up daily values in a column and get cumulative sum column

Thanks Devarasu. It worked like Charm!

Highlighted
New Contributor III

## Re: add up daily values in a column and get cumulative sum column

The above function won't be accepted in the data load. It is accepted only in the expression. But thanks for your reply. I appreciate the help.

Highlighted
New Contributor III

## Re: add up daily values in a column and get cumulative sum column

The above function won't be accepted in the data load. It is accepted only in the expression. But thanks for your reply. I appreciate the help.

Highlighted
New Contributor III

## Re: add up daily values in a column and get cumulative sum column

Hey Anand, The above function won't be accepted in the data load. It is accepted only in the expression. But thanks for your reply. I appreciate the help.