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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated field with null values

Hi experts,

Here is my problem :

I aim at calculating a field with 2 other fields :

--------------------------------------------

LOAD Date,

     Libellé,

     Débit,

     Crédit,

     Crédit + Débit as Delta

FROM

.....

--------------------------------------------

The problem is when one of the 2 values is null, Delta displays null too.

I think the best way to resolve it is to convert the null values to 0, before the calculation of "Delta"

Could anyone tell me how to do that ?

Regards,

Pierre.

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

You can use

RangeSum( Crédti, Débit) as Delta

Hope this helps,

Erich

View solution in original post

2 Replies
erichshiino
Partner - Master
Partner - Master

You can use

RangeSum( Crédti, Débit) as Delta

Hope this helps,

Erich

Not applicable
Author

I've read that isnull can give inconsistent results in 64 bit environments so a method using len is also here.

load

loadtime,

if(isnull(value),0,1) as isnull_value,

if(len(value)=0,0,1)  as len_value

;

load

now()  as loadtime,

null() as value

autogenerate 1;