Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
harleen_singh
Creator III
Creator III

Null value check doesn't work

Hello,

        

I am using following statement in backend to check and fill null values with 1 but it is not working

if(IsNull([Unit of Measure Code]),1,0) as ABC,

What may be the problem??

thanks
Lavi

3 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

hi,

Try this code

if(IsNull([Unit of Measure Code])=-1 ,1,0) as ABC,

or

If(len(trim(([Unit of Measure Code])) =0,1,0) as ABC

Deepak

harleen_singh
Creator III
Creator III
Author

@deepak,

          both statements not working

thanks

Lavi

deepakk
Partner - Specialist III
Partner - Specialist III

HI Lavi,

Can you attach any sample data. I can check at my end. Either of the above code should work or there might not be any null or blank data .

Deepak