Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Summing a field when there's a null value in one of the records

Is there a setting I can change to treat nulls as a zero in calculations found in my scripts?

I've used           if(isnull(field1)=0,field1,0)

However it tends to make my script run longer.

I've just seen Alt(field1,0) method and plan on testing it out.

Are there any other ways to have the script interpret a field as zero with minimal impact to load times?

I'd prefer to simply used a SET statement and have QV simply interpret nulls as zeros however I haven't seen anything like this.

Tags (1)
2 Replies
swuehl
Not applicable

Summing a field when there's a null value in one of the records

You could look into NullAsValue script statement and NullValue variable:

NullAsValue field1;

Set NullValue='0';

cesaraccardi
Not applicable

Re: Summing a field when there's a null value in one of the records

Hi,


Have you tried to run this way?

if(isnull(field1),0,field1)

Regards,

Cesar.