Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
bbi_mba_76
Partner - Specialist
Partner - Specialist

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