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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to handle Null() values

Hi All,

I have a problem in handling the null values in the table box. If I subtract null from a value (Say 10- Null()), the result should be blank. Instead alikview changes the value of null to zero and it is giving the result as 10, which is wrong. I have this problem, only when I use addition or substraction. Please see the attachment.

--Santhosh

5 Replies
Not applicable
Author

You could try replacing 'Sum' with 'Only' in the expression.

=((

Sum(if(Code='OR', Amt))-Sum(if(Code='OP', Amt)))/(Sum(if(Code='OR',Amt))))

becomes;

=((only(if(Code='OR', Amt))-only(if(Code='OP', Amt)))/(only(if(Code='OR',Amt))))





Not applicable
Author

Do you have a NullAsValue in your script ?

or check your NullInterpreter variable ?

Not applicable
Author

Hi Tat,

Before, I saw your reply, I tried using the function 'mode' instead of sum and it solved the problem too. Do you think, is that the correct way.

Not applicable
Author

Hi Spastor,

I don't have nullasvalue in my script. I also don't have nullinterpreter and I don't know what is nullintrepreter.

Not applicable
Author

Ok,

NullInterpreter is a default variable which define how Qlikview will display null values.

Rgds,