Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for
Did you mean:
Specialist

## How to write a Cumulative expression for attached data

Hello All,

I was trying to write a cumulative sum expression but some reason it is giving zero as out put ..what i mean is

For

Calmonth(Field) =201705-----it has to sum 201704+201705

=201706------it has to sum 201704+201705+201706

........So on

Expression i tried is :

RangeSum(Above(sum(VOLUME)), 0, RowNo())

Any suggestion on how to write a cumulative expression for below attached data ..

1 Solution

Accepted Solutions

Then Try this?

RangeSum(above(TOTAL sum(VOLUME),0,RowNo(TOTAL)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
15 Replies

Try this?

Rangesum(Below(Sum(VOLUME),0),Above(VOLUME,1,RowNo(TOTAL)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MVP

Output as zero in a chart or are you doing this in a text box object?

Specialist
Author

I tried your expression what i am getting is

when i tried SUM(volume) i am getting same

I have attached Sample data aswell......

Specialist
Author

HI ,i am doing it in Table....

Then Try this?

RangeSum(above(TOTAL sum(VOLUME),0,RowNo(TOTAL)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Specialist
Author

Is my second reply won't for you?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Master

Hi Naveen,

The brackets in your original expression were wrong, try;

Rangesum(Above(Sum(VOLUME),0, RowNo()))

gives:

CALMONTH Sum (VOLUME) Rangesum(Above(Sum(VOLUME),0, RowNo()))
540620590.72295 0
20170488254316.24301288254316.243012
201705108867027.09298197121343.33599
201706142117893.154339239236.48999
20170771972231.979963411211468.46995
201708105148241.14499516359709.61495
20170924260881.108001540620590.72295
2017100540620590.72295
2017110540620590.72295
2017120540620590.72295
2018010540620590.72295
2018020540620590.72295
2018030540620590.72295

Regards

Andrew

Creator

Use Full accumulation option in expression tab-click on this for particular chart

Community Browser