Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Multiple IF statements

Hi everyone,

looking for some help with IF statements. Basically I would like to setup multiple "if conditions" in one expression... but I cannot seem to get it to work.

Example:

if(WildMatch(UNIT_TYPE,'*I*'), UNIT_TYPE) or

if(WildMatch(UNIT_TYPE,'*O*'), UNIT_TYPE) or

if(WildMatch(UNIT_TYPE,'*E*'), UNIT_TYPE)

Even if I replace "or" with "and" it does not work. Any ideas on how I can do this?

1 Solution

Accepted Solutions
autopilot
Contributor III

Re: Multiple IF statements

Try this...

if(WildMatch(UNIT_TYPE,'*I*') or WildMatch(UNIT_TYPE,'*O*') or WildMatch(UNIT_TYPE,'*E*'), UNIT_TYPE)

4 Replies
autopilot
Contributor III

Re: Multiple IF statements

Try this...

if(WildMatch(UNIT_TYPE,'*I*') or WildMatch(UNIT_TYPE,'*O*') or WildMatch(UNIT_TYPE,'*E*'), UNIT_TYPE)

MVP
MVP

Re: Multiple IF statements

If(WildMatch(UNIT_TYPE,'*I*', '*O*', '*E*'), UNIT_TYPE)


Jonathan

Highlighted
MVP
MVP

Re: Multiple IF statements

Hi,

Try this

if(WildMatch(UNIT_TYPE,'*I*', '*O*', '*E*'), UNIT_TYPE)

Hope this helps you.

Regards,

Jagan.

Not applicable

Re: Multiple IF statements

Thank you everyone!

Community Browser