Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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)

Highlighted
MVP
MVP

Re: Multiple IF statements

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


Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
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