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: 
kunkumnaveen
Specialist
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
Anil_Babu_Samineni

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

View solution in original post

15 Replies
Anil_Babu_Samineni

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
sunny_talwar

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

kunkumnaveen
Specialist
Specialist
Author

Hello Anil,thanks for your reply..

I tried your expression what i am getting is Capture.PNG

when i tried SUM(volume) i am getting same

Capture1.PNG

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

kunkumnaveen
Specialist
Specialist
Author

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

Anil_Babu_Samineni

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
kunkumnaveen
Specialist
Specialist
Author

Any Suggestion Please

Anil_Babu_Samineni

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
effinty2112
Master
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

hari8088
Creator
Creator

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