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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Null Value

Hi Friends

I have a worksheet with following fields

Employee    Salary    EPF   ETF   Bonus

XXX               1000      12      2      100

YYY              2000      24     5       20

ZZZ                2000              50

When I load the data I write the following code in the script

salary+EPF+ETF+Bonus as Staff Cost

However in the case of Employee ZZZ I get zero value since EPF and Bonus are null values.

Pls help me to convert null values to 0 value when I load data

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Instead of

     salary+EPF+ETF+Bonus as Staff Cost

you should use

     RangeSum(salary,EPF,ETF,Bonus) as Staff Cost

See more in NULL handling in QlikView

HIC

View solution in original post

3 Replies
hic
Former Employee
Former Employee

Instead of

     salary+EPF+ETF+Bonus as Staff Cost

you should use

     RangeSum(salary,EPF,ETF,Bonus) as Staff Cost

See more in NULL handling in QlikView

HIC

upaliwije
Creator II
Creator II
Author

Thanks

Not applicable

hey upali,

when you load the data in the script use this condition on the fields EPF and Bonus-if(isnull(fieldname),0,fieldname) where fieldname is your EPF and Bonus.then you'll be able to do the required sum as it is i.e.Staff Cost.

also henric's answer would also work.mine is just more elaborated and elementary.