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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
gozdamar
Contributor
Contributor

Using '-' (dash) in If Statement

Hello all,

I am trying to write very easy if statement in table expressions. If the cell is '-', I want to see 'x':

if (Column1 = '-', 'x', 'y')

Somehow, Qlikview cannot recognize dash ('-'). Is this a kind if bug, or am I missing something?

Thanks a lot!

Labels (1)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

Nulls display as - by default, so are you sure this isn't actually null?  If so, there are a few functions in the load script that can handle (coalesce, alt for numeric values, if-statement). 

if it's front-end you can do: if (isnull(Column1) = '-', 'x', 'y').  alt would work also but again for numeric values.

View solution in original post

1 Reply
stevejoyce
Specialist II
Specialist II

Nulls display as - by default, so are you sure this isn't actually null?  If so, there are a few functions in the load script that can handle (coalesce, alt for numeric values, if-statement). 

if it's front-end you can do: if (isnull(Column1) = '-', 'x', 'y').  alt would work also but again for numeric values.