Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

Re: If Statement with multiple correct answers

May be using Match

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

puttemans
Valued Contributor

Re: If Statement with multiple correct answers

Hi there,

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

Regards,

Not applicable

Re: If Statement with multiple correct answers

Hi Sunny,

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

Community Browser