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: 
Not applicable

Comparing text with the operator "like"

Hello,

Problem (QV8.5) chart context:
Comparing 2 string fields (sometimes text > 256 char) as an expression in a chart (=table) with the
string operator "like" (TEXT08 like TEXT09) and the result is -1/0 (and 0 and -):

Example:
| | TEXT08 | TEXT09 | result (TEXT08 like TEXT09)
|1| ABCDEF | ABCDEF | -1 | (true, means "identical text", OK)
|2| ABKJMN | ABDJMN | 0 | (false, means "not identical text", OK)
|3| - | XYZABC | 0 | (false, means "not identical text", OK)
|4| OPQRST| - | - | (expecting 0 which should mean false as in case #3)

My problem is offering the user identical signs in the result field and not 0 or "-" when one of the text field is blank which means "not existing that year".
Any idea how to solve?

Problem (QV8.5) script context:
When I use the same (TEXT08 like TEXT09) in the skript I got only 0 or "-" (no "-1") in result field. Why?

Thank You in advance. dj

1 Reply
Not applicable
Author

Can you just test for null:

If (isnull(TEXT09), 0, ..............

Gordon