Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

If Syntax

Hello,

        If I am trying to determine whether a SKU falls into an Event labeled by Flyer during a particular week, should I do this as an if statement or a set analysis?

I can determine whether or not the SKU is part of a flyer event with the following:

if([Event] like '*Flyer*','Yes')

However, how do I incorporate a particular week that is dynamic into that expression? I am specifically trying to find whether or not the SKU is part of a flyer event between max([PO Rec Date]) and max([PO Rec Date])+6

Thanks!

Labels (1)
4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

wildmatch([Event], $(myWeek))

where myWeek is a variable

Hope it helps

Anonymous
Not applicable
Author

I think that might work!. How would I define the variable to include my range be

>=max([PO Rec Date])<=max([PO Rec Date]+6

alexandros17
Partner - Champion III
Partner - Champion III

You need a range not a single value:

at this point, if you need that condition in an expression, you can do something like:

Sum({$ <Event={'>=max([PO Rec Date])<=max([PO Rec Date]+6'}>} myValue)

MarcoWedel
MVP
MVP

Sum({$ <Event={"*Flyer*"}, week={'>=max([PO Rec Date])<=max([PO Rec Date]+6'}>} myValue)