Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi
PFA
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 | ||
1 | 10 | 10 | 0 | |
2 | 20 | 30 | 0 | |
3 | 30 | 60 | 0 | |
4 | 40 | 100 | 0 | |
5 | 50 | 140 | 10 | 13.0 |
6 | 60 | 180 | 30 | 5.0 |
7 | 70 | 220 | 60 | 2.7 |
8 | 80 | 260 | 100 | 1.6 |
9 | 90 | 300 | 140 | 1.1 |
10 | 100 | 340 | 180 | 0.9 |
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
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/2014 | 3.16 |
12/12/2014 | 1.06 |
19/12/2014 | 0.36 |
26/12/2014 | 0.04 |
02/01/2015 | -0.04 |
09/01/2015 | -0.04 |
16/01/2015 | -0.03 |
23/01/2015 | 0.09 |
30/01/2015 | 0.21 |
06/02/2015 | 0.23 |
13/02/2015 | 0.25 |
20/02/2015 | 0.16 |
27/02/2015 | 0.12 |
06/03/2015 | 0.11 |
13/03/2015 | 0.10 |
20/03/2015 | 0.11 |
27/03/2015 | 0.11 |
03/04/2015 | 0.10 |
10/04/2015 | 0.08 |
17/04/2015 | 0.06 |
24/04/2015 | 0.05 |
01/05/2015 | 0.04 |
08/05/2015 | 0.05 |
15/05/2015 | 0.04 |
22/05/2015 | 0.04 |
29/05/2015 | 0.00 |
05/06/2015 | -0.01 |
12/06/2015 | -0.01 |
19/06/2015 | -0.02 |
26/06/2015 | 0.03 |
03/07/2015 | 0.01 |
10/07/2015 | 0.00 |
17/07/2015 | 0.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 |
Hi Mayil,
can you please make it for Product wise, because product isn't available in your output.
Regards,
Padmanabhan
Hi,
Could you please provide your expected result ?
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
Hi
PFA
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/14 | 8/21 | 8/28 | 9/4 | 9/11 | 9/18 | 9/25 | 10/2 | 10/9 | 10/16 | 10/23 | 10/30 | |
S | 37.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% |
C | 2.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% |
Hi Mayil,
I got it, we need to aggregate by Product, WeekEndingDate.
thank you for your quick responses.
Padmanabhan