Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting Sales Orders to show on the last two weeks info

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.

3 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

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]))

Not applicable
Author

Hi Liron,

(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.

Kind regards

Matthew Raschke

Email: matthew.raschke@ellies.co.za

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

lironbaram
Partner - Master III
Partner - Master III

hi

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