Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cummulative/Rolling Sum needed for chart (Doesnt work with Full Accumulation Option)

Hi Everyone,

I am a new to Qlikview and hopefully someone can help me with solution/suggestion for the issue below ( also shown in attachment )

I would need a rolling sum for each week in the qtr ( W1 to W13 of 2011Q1 and 2011Q2 ) to get Cummlative Amount and Cummulative Units. Then rate column would be a simple division between the 2 columns which is what I need to chart finally. What I finally need is the chart ( as shown below after the table) but  I am also showing the below straight table representation of the chart data. If I can get the any one of the below outputs that would be great. Please let me know if you need more explanation.

WeekInQtrYearQuarterAmountCumm AmountUnitsCumm UnitsRate=Cumm Amount/Cumm Rate
12011Q110101110.0
12011Q220202210.0
22011Q110201210.0
22011Q220402410.0
32011Q140603512.0
32011Q250904811.3
42011Q1501104912.2
42011Q28017031115.5
52011Q13014041310.8
52011Q21018011215.0
62011Q13017041710.0
62011Q21019051711.2
72011Q1101806237.8
72011Q29028072411.7
82011Q1452253268.7
82011Q22530522611.7
92011Q1602855319.2
92011Q29540073312.1
102011Q1253102339.4
102011Q24544553811.7
112011Q1303403369.4
112011Q29053584611.6
122011Q1854258449.7
122011Q21054514711.6
132011Q1104351459.7
132011Q22056524911.5

chart.jpg

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi,

I think you need an advanced aggregation to get your desired results here.

Please look at attached sample and / or screenshot.

Regards,

Stefan

YearWeekCumm.png

View solution in original post

9 Replies
its_anandrjs

Hi,

See the attached sample file you have to make a chart some thing like this with line chart graph.

HTH

Rgds

Anand

Not applicable
Author

Hi Anand,

Thanks for your reply.

Actually the problem I have is to know how to get the Cummulative Amount and Cummulative Units columns as shown above assuming we have WeekInQtr, YearQuarter, Amount and Units.

its_anandrjs

Hi,

Use some thing like in the Solution sheet.

Rgds

Anand

Not applicable
Author

Hi Anand,

The straight table should always be grouped by week and then quarter...for the chart to show the right cummulation numbers. Unfortunately the solution you provided doesnt work when I chart the straight table.

WeekInQtrYearQuarterAmountCumm AmountUnitsCumm UnitsRate=Cumm Amount/Cumm Rate
12011Q110101110.0
12011Q220202210.0
22011Q110201210.0
22011Q220402410.0
SunilChauhan
Champion
Champion

try this

RangeSum(Above(Sum([Cumm Amount]), 0, RowNo()))

/

RangeSum(Above(Sum([Cumm Rate]), 0, RowNo()))

hope this helps

check weither  proper name Cumm amount and Cumm rate

Sunil Chauhan
Not applicable
Author

Hi Sunil, this doesnt work .. I dont get the result I need.. thanks for your reply though

swuehl
MVP
MVP

Hi,

I think you need an advanced aggregation to get your desired results here.

Please look at attached sample and / or screenshot.

Regards,

Stefan

YearWeekCumm.png

qliksus
Specialist II
Specialist II

Hi,

Please see the attached file to do this in the script level

Not applicable
Author

Hi Stefan,

You are the Qlikview Guru

That solution worked for me... thanks a ton. Have a nice weekend.

Thank you Qliksus.. you have a nice weekend

Thanks