Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
CJR
Contributor II
Contributor II

Showing '-' values as something else

Hi all,

Hoping someone can help with this - I'm sure it's basic but I've not figured it out!

I have a dimension to return a Yes or No dependent on the value in Field1 =if(match( [Field1],'A','B','C'),'Yes','No').

This works to return A, B and C as a Yes, and any other values in Field1 as a No. However, I want to also include anything with a blank value in Field1 as a 'No' but it's currently returning a '-' in my Qlik Sense visualisation.

I'm hoping someone can help out with this...I've tried using things like isnull and searching for blanks but. It feels like it should be easy to sort but I'm failing! 🙂 Thanks!

6 Replies
vinieme12
Champion III
Champion III

use Pick() and Wildmatch() instead as below

Match() is case sensitive

 

=Pick(Wildmatch( [Field1],'A','B','C')+1,'Yes','No')

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
CJR
Contributor II
Contributor II
Author

Hi Vineeth, thanks for the reply, but having tried what you've suggested it doesn't appear to have worked. I'm still having the issue of returning 'yes'. 'no' and '-' but I need the '-' to be displayed as 'no'...

CJR_0-1665503523550.png

Any suggestions as to what I'm doing wrong please?!

vinieme12
Champion III
Champion III

try with wildmatch()

=if(Wildmatch( [Field1],'A','B','C'),'Yes','No')

 

 

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
MayilVahanan

Hi

Try like below

Coalesce( if(match( [Field1],'A','B','C'),'Yes'), 'No')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CJR
Contributor II
Contributor II
Author

Thanks for the other messages - unfortunately the options suggested are still leading to the same result. I'll keep trying other things!

 

SchalkF
Contributor III
Contributor III

Hi,

Is it possible that your data set includes Null values in Field1?

If there is maybe try (If(Not IsNull(Field1), (Wildmatch( [Field1],'A','B','C'),'Yes','No'), 'No')

Kind regards