Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
etrotter
Creator II
Creator II

Nested IF function

Hi I have a fairly basic if statement but instead of 'Yes' its coming back null, any ideas:

=If(Match([Encore.Full_Name],[Workday.Full_Name]),'Yes',If(Match([Encore.Full_Name],[GLS.Full_Name]),'Yes',If(Match([Encore.Full_Name],[GLS.Full_Name]),'Yes', 'No')))

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

what type of Object you're using ?

try this:

=If(Match([Encore.Full_Name],[Workday.Full_Name]) and Match([Encore.Full_Name],[GLS.Full_Name]) and Match([Encore.Full_Name],[GLS.Full_Name]),'Yes', 'No')



View solution in original post

7 Replies
YoussefBelloum
Champion
Champion

Hi,

what type of Object you're using ?

try this:

=If(Match([Encore.Full_Name],[Workday.Full_Name]) and Match([Encore.Full_Name],[GLS.Full_Name]) and Match([Encore.Full_Name],[GLS.Full_Name]),'Yes', 'No')



jwjackso
Specialist III
Specialist III

Based on this page, On Boolean Fields and Functions

TRUE = -1 and FALSE = 0

The match is returning either 0 or 1.

Try changing to =If(Match([Encore.Full_Name],[Workday.Full_Name]) > 0,'Yes',If(Match([Encore.Full_Name],[GLS.Full_Name]) > 0,'Yes',If(Match([Encore.Full_Name],[GLS.Full_Name]) > 0,'Yes', 'No')))


etrotter
Creator II
Creator II
Author

thank you for your help, but it is still coming back as null for both of these, in both cases it has been trimmed and uppered in the script:

Capture.PNG

YoussefBelloum
Champion
Champion

the document says that if Match is used in a boolean position, it will be interpreted as TRUE or FALSE.. so don't to test if it is >0 or =0.. I always use only if(Match(field,'Values', yes, no)


jwjackso
Specialist III
Specialist III

Try a simple If test without the Match function,

=If(Encore.Full_Name] = [Workday.Full_Name],'Yes',If([Encore.Full_Name] =[GLS.Full_Name],'Yes',If([Encore.Full_Name] = [GLS.Full_Name],'Yes', 'No')))

The Match function compares the first field to a list of strings.

etrotter
Creator II
Creator II
Author

I Just realized i put it as a dimension instead of a measure..... its working now

PrashantSangle

for better performance and all column coming from same table then move your logic in script. It will work much faster.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂