Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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!

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.