Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

sales if statement based on variable

hi i have the following statement

sum(if([Year Week]=weekyear(today()-7)&num(week(today()-((7 * $(OrderVeckor))

)),00),[Order Quantity],0))

$(OrderVeckor) = 7

201346 - 201401

i wish to calculate the Orderquantity for the last 7 weeks.

my statement however is wrongly formulated, any suggestions.

Best

Brad

1 Reply
Highlighted
Partner
Partner

Hi,

I'm not sure, maybe something like this?

sum(if([Year Week]>=

weekyear(today()-(7 * $(OrderVeckor)))&num(week(today()-(7 * $(OrderVeckor))),00)

,[Order Quantity],0))

Where are you calculate this value, script or expression?

If you could attach the qvw, it is better