Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Creator II
Creator II

Multiple IF conditions on one field

Hi experts

I need to fill a new field "compliant". Only one field "Field A" should be in the condition.

(If([Field A] = '0', '0') OR IF([Field A] = '3', '3') OR If([Field A] = '4', '4') OR If([Field A] = '5', '5')) as [Compliant],

Unfortunately the result in the app shows "-1" , and not the required value in the conditions.

Can you plesae support and help?

Many thanks

Tom

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

By the looks of it you don't need to use multiple if's.

 

Try this:

/*If Field A is 0,3,4 or 5 then use the value of Field A */
If( match([Field A], '0', '3','4','5'), [Field A]) as [Compliant],

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

2 Replies
Vegar
MVP
MVP

By the looks of it you don't need to use multiple if's.

 

Try this:

/*If Field A is 0,3,4 or 5 then use the value of Field A */
If( match([Field A], '0', '3','4','5'), [Field A]) as [Compliant],

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Vegar
MVP
MVP

If you do need to use multiple if statements then try this:

 

IF([Field A]= '0', '0',
    IF([Field A]= '3', '3',
        IF([Field A]= '4', '4',
             IF([Field A]= '5', '5', Null() )))) as [Compliant]

Plees ekskuse my Swenglish and or Norweglish spelling misstakes