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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If not statement isn't working using MATCH

Hi everyone,

I have the following statement in a script that doesn't work. If I take out the <> at the first bracket, the satement does work but I want to be able to exclude any call signs that are CY. I have tried to do a not match statement but wasn't succesful. What am I doing wrong?

IF

(<>left(CallSign_Assign,2)='CY' AND a8_responder=1,time_clock_start-time_effective_on_scene) as A8ExPrivProvOnScene





2 Replies
Miguel_Angel_Baeyens

Hello,

Try with the following expression

If(left(CallSign_Assign, 2) <> 'CY' AND a8_responder = 1, time_clock_start-time_effective_on_scene) as A8ExPrivProvOnScene


Hope that helps

prieper
Master II
Master II

The "<>" cannot be in this place.
Your statement already considers only Callsigns starting with CY and a8=1, for all other values you will receive already a NULL-value.
If you wish to filter only for the above found values, you either have to put a WHERE-clause into your script, or do a preceding load with a WHERE-clause, like

LOAD * WHERE LEN(TRIM(A8ExPrivProvOnScene)) > 0; LOAD ... IF ....


HTH
Peter