Discussion Board for collaboration on QlikView Scripting.
Good day All,
Please could you help me with a method to restrict sales Orders tyo show on the last two weeks.
Im using ORDDATE to try do this, I have restricted them to look at last two months before but for weeks it not the same.
(if(MonthIndex >= ( vMaxMonthIndex -1), [Order Quantity Backordered]*[Component Qty]))
is what i used for Months.
Thank you for any assitance you may have.
you can use the function week() which returns the week number in a year ,
then use a similar method to the one you used in month but this method don't support weeks from to different years
your other option is something like
(if(Date >= ( vMaxDate-14), [Order Quantity Backordered]*[Component Qty]))
(if(Date >= ( vMaxDate-14), *))
This is looking good, but we have not created vMaxDate – did you create this in variable overview, if so what was your script for that, or how would I word that.
Tel: +27 11 490 3893
Cell: +27 82 318 5051
www.ellies.co.za <http://www.ellies.co.za> <http:// <http://> www.ellies.co.za/>
94 Eloff Street Ext, Village Deep,
Johannesburg,2001, South Africa.
The only place success comes before work is in the dictionary
P please consider the environment before printing this email
i would create it in variable that holds
=max(Date) , note it important to use the = sign
so the variable will be calculated once in the model
if you don't want to use variable
you can try to use
(if(Date >= ( $(=max(Date))-14), *))
while this is an expression the result will be the same as , the $(=) also calls for calculating the expression at model level , disregarding the chart dimensions