Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
padmanabhan_ram
Creator II
Creator II

4x4 week growth in line graph

Hi All,

Hope you are doing good!!!

I need your help to identify logic in QlikView for calculating 4x4 week volume growth and present in a line graph. I have attached the required data. The requirement is to have Week Ending Date as Primary dimension, Product as Secondary secondary.

In the expression I need a logic that can calculate and give the % of  growth for each week using 4x4 week rolling.

For Example,

week, volume

1,10

2,20

3,30

4,40

5,50

6,60

7,70

8,80

9,90

10,100

the expression calculation should give value for each week say week 8 should do sum(volume of week8,7,6,5) which is 260 - sum(volume of week 4,3,2,1) which is 100 and output should be (260-100)/100=1.6.

the value for week 9 should be (300-140)/140=1.1

the value for week 10 should be (340-180)/180=0.8

please let me know if you find the logic.

Thanks in advance.

Padmanabhan

1 Solution

Accepted Solutions
MayilVahanan

Hi

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

17 Replies
MayilVahanan

Hi

Try like this

weekSample Volume =RangeSum(Above(Sum(volume),0, 4)) =RangeSum(Above(Sum(volume),4, 4)) =(Column(2) - Column(3)) / Column(3)
550 0 0
110100
220300
330600
4401000
5501401013.0
660180305.0
770220602.7
8802601001.6
9903001401.1
101003401800.9
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
padmanabhan_ram
Creator II
Creator II
Author

Hi Mayil,

Thanks for your response, but I want it for the data that has been attached and in a line graph not as a table.

Regards,

Padmanabhan

MayilVahanan

Hi,

Thats for your reference.

You can change it to line chart.

Could you check the output is matched as per your expectation.

    

WeekEndingDate

=(RangeSum(Above(Sum(SumOfVolume),0, 4)) - RangeSum(Above(Sum(SumOfVolume),4, 4))) /

RangeSum(Above(Sum(SumOfVolume),4, 4))

05/12/20143.16
12/12/20141.06
19/12/20140.36
26/12/20140.04
02/01/2015-0.04
09/01/2015-0.04
16/01/2015-0.03
23/01/20150.09
30/01/20150.21
06/02/20150.23
13/02/20150.25
20/02/20150.16
27/02/20150.12
06/03/20150.11
13/03/20150.10
20/03/20150.11
27/03/20150.11
03/04/20150.10
10/04/20150.08
17/04/20150.06
24/04/20150.05
01/05/20150.04
08/05/20150.05
15/05/20150.04
22/05/20150.04
29/05/20150.00
05/06/2015-0.01
12/06/2015-0.01
19/06/2015-0.02
26/06/20150.03
03/07/20150.01
10/07/20150.00
17/07/20150.01
24/07/2015-0.02
31/07/2015-0.01
07/08/2015-0.00
14/08/2015-0.01
21/08/2015-0.01
28/08/2015-0.01
04/09/2015-0.00
11/09/2015-0.02
18/09/2015-0.02
25/09/2015-0.03
02/10/2015-0.05
09/10/2015-0.01
16/10/2015-0.02
23/10/2015-0.01
30/10/2015-0.01
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
padmanabhan_ram
Creator II
Creator II
Author

Hi Mayil,

can you please make it for Product wise, because product isn't available in your output.

Regards,

Padmanabhan

MayilVahanan

Hi,

Could you please provide your expected result ?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
padmanabhan_ram
Creator II
Creator II
Author

Hi Mayil,

The expected result should be in the line graph, WeekEndingDate(Primary) and Product(secondary) as Dimension then may be the expression which you have shared. should give me the values for each week for respective products.

Br,

Padmanabhan

MayilVahanan

Hi

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
padmanabhan_ram
Creator II
Creator II
Author

Hi Mayil,

Thanks for the attached. The QVW shows exactly the required value % when I select individual product explicitly but when none of the Product is selected then it shows different value. I am applying filters on Region = East.

expected output for few weeks is below.

  

8/148/218/289/49/119/189/2510/210/910/1610/2310/30
S37.6%30.8%25.5%22.6%17.2%17.0%16.4%13.4%13.5%13.1%11.7%10.1%
B-5.5%-3.7%-4.8%-4.8%-5.4%-6.0%-6.8%-8.3%-5.0%-4.3%-2.3%-2.5%
C2.5%2.3%0.1%-0.5%-3.2%-1.8%-1.2%-2.0%1.2%-0.9%-1.1%-0.8%
Q-2.1%-3.7%-5.2%-4.6%-4.3%-2.0%-0.4%-2.7%2.0%0.2%-0.6%1.3%
padmanabhan_ram
Creator II
Creator II
Author

Hi Mayil,

I got it, we need to aggregate by Product, WeekEndingDate.

thank you for your quick responses.

Padmanabhan