Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to get the value of Average Change per 10 week. Please find the attached qvw and excel sheet with Sheet name 'Data' which contains sample date to load into QlikView and Sheet 'Expected calculation', the Cell 'Calculated Slope' is the expected output in the QlikView for 'Average change per 10 week' column.
Looking for your response. Thank you.
Br,
Padmanabhan
Calculate the difference between weeks for each region in the script:
Temp:
LOAD
Region,
Week,
Volume
FROM
excelfile
;
Result:
LOAD
Region,
Week,
Volume,
If(Region=Previous(Region),Volume-Previous(Volume)) as Change
RESIDENT
Temp
ORDER BY
Region, Week
;
DROP TABLE Temp;
Then calculate the average in the chart with the expression Avg(Change).
Hi,
check this.Hope this helps.
Thanks.
Dear Gysbert,
Thank you for the response. But when i try to apply the same logic for bigger size of data the output doesn't match.
Please find the attached data, where the output for 'Average change per 13 week' should be 28 for the below selections.
Area='South', Product='A'.
could you please help me to find this out.
Br,
Padmanabhan
Hi,
Hope this helps or leads you in the right direction.
Regards
Kamiel
Try as AsOf table: Calculating rolling n-period totals, averages or other aggregations
Hi Kamiel,
Thank you for the reponse.
if I apply the same logic with large data then the output doesn't match.
Please find the attached data for which I am trying to get the Average change per 13 week = 28 for South Area, product =A.
Please let me know if you get the same value or near to that.
Br,
Padmanabhan