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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Mario_ES
Contributor III
Contributor III

If is any of this characters return...

Hello,

I'm trying to create a calculated dimension.

I want to create an if statement that shows if an alphanumeric first character is X,Y or Z show O.

=if(left(Dimension,1)='Y',0,1)

This works, but when I try with all the letters I get an error: =if(left(Dimension,1)=('Y','Z','X'),0,1)

Thank you in advance

1 Solution

Accepted Solutions
Or
MVP
MVP

if(Match(Left(Dimension,1),'X','Y','Z'),0,1) should work. You could also use three if(conditoin1 OR Condition2 OR Condition3,0,1)

View solution in original post

1 Reply
Or
MVP
MVP

if(Match(Left(Dimension,1),'X','Y','Z'),0,1) should work. You could also use three if(conditoin1 OR Condition2 OR Condition3,0,1)