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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between null and zero

Hi,

I have a widget which uses this code to hide the widget if data is unavailable. (NULL)

=



if(isnull(Value),-1,0)

The problem is that when the value is 0, it seems to hide the widget.

Why is this? surely qlikview disinguishes between 0 and null.

2 Replies
Anonymous
Not applicable
Author

You're right, there is a clear difference between null and 0 (and empty string as well). Check the values of the Value. If you think there is still a problem, post an example here.

johnw
Champion III
Champion III

If you're using 64-bit, there may not be such a clear difference, and it isn't a good idea to use isnull(). It seems that they went for performance over functionality and backwards-compatibility. If you're using 64-bit, I'd use =len(Value)<1. For that matter, in case you ever migrate to 64-bit, I'd get in the habit of not using isnull().