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

13 week average

.

4 Replies
fdelacal
Specialist
Specialist

YOU SHOUL DO IT WHIT THE CALENDAR DATE NOT SALES DATE

HOPE THAT HELPS

datanibbler
Champion
Champion

Hi TimmyHop,

I would suggest a two-step process:

- Devise a way to assign a running number (1,2,3...) to the weeks that have sales - not to the ones without. Then you'll have a new field, say you call it "Week_w_Sales" (numeric).

- You could then use set_analysis and tell QlikView to calculate the avg. of all those weeks_with_sales between the >week_with_sales 13 weeks ago< and the current week. Should look sth like this

>>> avg({1<Week_with_sales = {"'>= $(=(Week(TODAY())-13))"}>} sales) <<<

HTH

Best regards,

DataNibbler

Not applicable
Author

Hi, thanks for your reply.

i already have a chart expression  that seems to do exactly what i want..

..

datanibbler
Champion
Champion

Hi TimyHop,

the script does not support set_analysis (what I proposed), but it should be possible to put your formula here into the script - just try it out, if the commands turn blue, they are supported and functional. You can then put this expression into your LOAD statement and you'll have an additional field that you can use i a diagram.

Best regards,

DataNibbler