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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IsNull function not working in script

Hi Friends,

I am having a Issue with Isnulll function. Some of expert can please help me to resolve this Issue

I am having field called Date.I want to show 0 when there is no Date got selected.

In front end side I am using formula in Text Object if(Isnull(Dates) = -1,0,1) we expected output 0. It's getting as expected.

I have written Same formula in script

Test:

LOAD

Dates,

if(IsNull(Dates)=-1,0,1) as [Date Info]

FROM

xyz.qvw

but [Date Info] is displaying only 1. Not even 0. Just like in below Screen shot

Isnull.PNG

Some can plz help on this. I am attaching sample data and sample qvw

Thank you,

Swarupaaa

Labels (1)
12 Replies
Not applicable
Author

Hi Stefan

Thank you for your reply. I have Tried this but it's not working

kruppas78
Contributor III
Contributor III

Problem is that you only read 1 column.

on which date should QlikView set the value 0?

You can use

LOAD RowNo()+1 as Row,

  Dates,

if(IsNull(Dates),0,1) as [Date Info]

the Row will Show you the Excel file Row when there is an empty date.

Not applicable
Author

Thank you, Stefan