Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Running total / cummulative

Hi friends,

I hav a challenge,

kindly go through the excel attached which contains two sheet ,wherein one was the sample page and the other was the result page that i would like my result to be

To brief it here ,based on the cateogory the cummulative /running total should be done, for a quik review kindly find the image attached.

kindly help me out guys!!!

Thanks ahead

Regards

Anand

1 Solution

Accepted Solutions
robert99
Valued Contributor II

Re: Running total / cummulative

I used your excel sheet and loaded into QLIKVIEW

Then I see up a chart straight table (or chart pivot table)

Then I set up

dimensions.

Selected 

Category and  item

Expressions

sum (Amount)

SUM(TOTAL<Category>Amount)

RangeSum (above(sum(Amount),0,RowNo()))

You will need to sort in some way to get the order the same as your excel spreadsheet

I think this will work. I have done similar at work (I use sum total category) or need to do similar whihc I will use range sum etc

8 Replies
robert99
Valued Contributor II

Re: Running total / cummulative

Awful solution I know but it kind of works for a small number of categories. (I look forward to a better solution)

if(RowNo()=1,sum(Amount),

if(RowNo()=3,sum(Amount)+(above(sum (Amount),2))+above(sum(Amount)),

if(RowNo()=2,sum(Amount)+above(sum(Amount)),

if(RowNo()=4,sum(Amount)+(above(sum (Amount),2))+above(sum(Amount))+(above(sum (Amount),3)),

if(RowNo()=5,sum(Amount)+(above(sum (Amount),2))+above(sum(Amount))+(above(sum (Amount),3))

+(above(sum (Amount),4)),

if(RowNo()=6,sum(Amount)+(above(sum (Amount),2))+above(sum(Amount))+(above(sum (Amount),3))

+(above(sum (Amount),4))+(above(sum (Amount),5)),

if(RowNo()=7,sum(Amount)+(above(sum (Amount),2))+above(sum(Amount))+(above(sum (Amount),3))

+(above(sum (Amount),4))+(above(sum (Amount),5))+(above(sum (Amount),6))

,

0)))))))

I have just used (which has worked for me so far for my requirements)

SUM(TOTAL<Category>Amount)

to avoid the above but Im sure there is a much better solution (I just have not been able to work it out yet)

robert99
Valued Contributor II

Re: Running total / cummulative

This seems to work too (straight and pIvot tables)

RangeSum (above(sum(Amount),1,RowNo()-1))+sum(Amount))

or

RangeSum (above(sum(Amount),0,RowNo()))

Not applicable

Re: Running total / cummulative

RJ, could you please provide the solution in qlikview with the test excel attached

Kind Regards

Anand

robert99
Valued Contributor II

Re: Running total / cummulative

Have you a problem with or difficulty understanding the solution

Not applicable

Re: Running total / cummulative

RJ,

I have difficulty in understanding the solution and so requesting you to provide me the soultion in qlikview itself with the sample data I requested .. plz help

Regards

Anand

robert99
Valued Contributor II

Re: Running total / cummulative

I used your excel sheet and loaded into QLIKVIEW

Then I see up a chart straight table (or chart pivot table)

Then I set up

dimensions.

Selected 

Category and  item

Expressions

sum (Amount)

SUM(TOTAL<Category>Amount)

RangeSum (above(sum(Amount),0,RowNo()))

You will need to sort in some way to get the order the same as your excel spreadsheet

I think this will work. I have done similar at work (I use sum total category) or need to do similar whihc I will use range sum etc

Not applicable

Re: Running total / cummulative

Thanks a Ton RJ , It worked ,Thanks a Lot for ur help !!!

Not applicable

Re: Running total / cummulative

RJ,

could you please let me know whether is there any possibility to do the same, apart form using the rangesum function in pivot.

just wanted to know if at all if any please let me know

Kind Regards

Anand

Community Browser