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: 
Not applicable

If Statement with multiple correct answers

Hi Guys,

Just a quick one if have an if statement where there are 3 potential right answers (4,5 or 6). What is the correct syntax for 'OR' statements?

if(Month([Pickup Date])=('4,5,6'),Sum(Pop2016)+Sum([Peak Tourist Pop])

Any help would be appreciated.

Cheers,

Chris

3 Replies
sunny_talwar
MVP
MVP

May be using Match

=If(Match(Month([Pickup Date]), 4, 5, 6), Sum(Pop2016) + Sum([Peak Tourist Pop]))

puttemans
Specialist
Specialist

Hi there,

If(Month([Pickup Date] >=4 and Month([Pickup Date] <=6, Sum(Pop2016)+Sum([Peak Tourist Pop]) as ...

Regards,

Not applicable
Author

Hi Sunny,

This doesn't seem to be working although I don't know why the  logic seems sound