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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

New to Qlik Load Statement and or with Null values


Hi I am fairly new to Qlik and trying to write a load statement with several criteria. I need to only pull in new status id's and old status id's with a status change date greater than 01/01/2015. I only want new status ids that are 9 and old status ids that are null. I cannot get this to work and have tried multiple combinations from blogs. Any help is greatly appreciated!

WHERE [StatusChangeDate] >='01/01/2015' AND [NewStatusID] ='9'

OR [OldStatusID] = is null

8 Replies
Chanty4u
MVP
MVP

Anonymous
Not applicable
Author

Thank you sureshqv! That helps although, I have to find another way around this issue. There is a time stamp associated with the null value which I need to bring in.

sundarakumar
Specialist II
Specialist II

Pls try this

WHERE [StatusChangeDate] >='01/01/2015' AND

([NewStatusID] ='9' or

isnull([OldStatusID]) )

-Sundar

tamilarasu
Champion
Champion

Try,

WHERE ([StatusChangeDate] >='01/01/2015' AND [NewStatusID] ='9')

OR Len(Trim([OldStatusID])) = 0

sundarakumar
Specialist II
Specialist II

Sorry  [StatusChangeDate] >='01/01/2015' should not work correct since it is being checked in text format , i would prefer to do the check in num format rather bec we are not sure of what format the data field is in db.

try adding like

WHERE  num([StatusChangeDate]) >=num(makedate(2015,1,1)) AND

([NewStatusID] ='9' or

isnull([OldStatusID]) )

Not applicable
Author

where [StatusChangeDate] >='01/01/2015' and

(

[NewStatusID] =9

OR Len([OldStatusID]) = 0

)

Kushal_Chawda

WHERE num([StatusChangeDate]) >=num(date#('01/01/2015','DD/MM/YYYY')) AND ([NewStatusID] ='9'

OR Len(Trim([OldStatusID])) = 0)

Anonymous
Not applicable
Author

Thank you for the help, this one did the trick.

Thank you everyone else for the support.

Cheers!