Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
etrotter
Creator II
Creator II

Wierd Nulls Popping up when Creating Flags

Good Afternoon,

I am experiencing issues when creating flags where many of them are nulls for no apparent reason:

In the Script:

    Trim(Upper(Status)) as Status,

    If(Trim(Upper(Status))='INACTIVE',0,If(Trim(Upper(Status))='TERMINATED',0,If(Trim(Upper(Status))='ON HOLD',0,If(Trim(Upper(Status))='ON LEAVE',0,If(Trim(Upper(Status))='RESIGNED',0,1))))) as Active_Flag,

    if(Trim(Upper(Status))='TERMINATED',1,0) as Terminated_Flag

Output:

Capture.PNG

As you can see, the for the inactive it is null in one place but is working correctly in another. The if statement is basically the same for the terminated flag, but it is coming through fully with no nulls.

Please let me know if you have any ideas!

Thanks,

Erica

23 Replies
sasiparupudi1
Master III
Master III

May be change the logic other way round.. try

IF(Trim(Upper(Status))='FULL-TIME',1,0) as Active_Flag

etrotter
Creator II
Creator II
Author

I load one other table but this is my layer 2 so I drop it. This one table is the only one that is in the Data Model Viewer

etrotter
Creator II
Creator II
Author

I tried the reverse flag but it still has nulls

juraj_misina
Luminary Alumni
Luminary Alumni

Hi Erica,

can you maybe attach whole script of this app? I'm running out of ideas (contact support being the last idea).

Juraj