Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum fields with sometimes missing values

Hi,

trying to sum up a few fields as per below.

Problem is, when data Is missing (most oftenly one or two fields are empty) which results in a "-" rather than a sum.

I need these missing values to be treated as zeroes to be able to calculate a sum for each date.

LOAD

A,

B,

C,

D,

A+B+C+D as DailyNet

FROM

(ooxml, embedded labels, table is Sheet1);

1 Solution

Accepted Solutions
Not applicable
Author

Hi olle

Try to in load for each field:

IF(IsNull(A),0,A) as A

View solution in original post

5 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Olle,

please check out the following link

http://community.qlik.com/docs/DOC-3155

Regards

Andy

trdandamudi
Master II
Master II

Put a check mark against "Suppress when value is null" and this will take care of the issue.

Not applicable
Author

Hi olle

Try to in load for each field:

IF(IsNull(A),0,A) as A

prieper
Master II
Master II

use

RANGESUM(A, B, C, D) as DailyNet

Returns the sum of a range of 1 to N arguments. As opposed to the + operator, rangesum will treat all non-numeric values as 0.

HTH Peter

MK_QSL
MVP
MVP

Try

RangeSum(A,B,C,D) as DailyNet