Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alaaj907
Contributor
Contributor

'If statement for multiple values'

Hello,

I'm trying to write a Qlik sense code that checks if there are multiple values in a cell and puts 'yes' or 'no.

more than 3 values= 'yes'

3 values or less= 'no'

This is what I came up with so far:

if(match(Field,'1','2','3','4'),'y',if(match(Field,'1','2','3'),'n',''))

 

2 Replies
Or
MVP
MVP

I'm not clear on what you're trying to do - "cell" is not a concept that Qlik typically uses.

Generally, if you want a count of the values, you use Count(Field) or Count(Distinct Field).

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

if (Count(DISTINCT Field) > 3, 'yes'. ,no')

-Rob