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: 
Not applicable

Sum of Multiple fields into one while loading

Hi,

Below load script fails to sum up all the values

Load

residentialunitprice+maintenancefundprice+totalcustomizationcharges+totalservicetax+totalvat+wc as S_TotalCharges

FROM

[$(vPath)\tesaleorde.qvd]

(qvd);

But when i load all the above fields separately and sum up it shows correct value.

Please help me with this.

Regards,

Keerthi KS

13 Replies
Not applicable
Author

Currently i have used

if(IsNull(residentialunitprice),0,residentialunitprice)+if(IsNull(maintenancefundprice),0,maintenancefundprice)

    +if(IsNull(totalcustomizationcharges),0,totalcustomizationcharges)+if(IsNull(totalservicetax),0,totalservicetax)

    +if(IsNull(totalvat),0,totalvat)+if(IsNull(wc),0,wc) as S_TotalCharges

jagan
Partner - Champion III
Partner - Champion III

Hi Keerthi,

Did you tried my solution?  Rangesum() will do all this checks.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Yes I have tried your approach and Its working.

I have used '+' instead of ',' so it was not working.

Thanks a lot.

Regards,

Keerthi

jagan
Partner - Champion III
Partner - Champion III

Hi Keerthi,

If you got the answer please close this thread by giving correct and helpful answers to the helpful posts.

Regards,

jagan.