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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum with null values

Dears,

How can I sum 5 different collumns?

All of these columns can have null values...

I was trying to use the set analysis as follow, coz I would like to sum only if an specific creterias is match:

The Worktable was set as the sum of those 5 different collumns

TAB1+TAB2+TAB3+TAB4+TAB5 as WORKTABLE,

sum({$<MOD = {MOD1}, Model -= {''}>} WORKTABLE)

But It didn´t worked...

Thanks per your attention

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use Rangesum(TAB1, TAB2, ...) as WorkTable.

Like Sum, RangeSum treats nulls as zeroes.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use Rangesum(TAB1, TAB2, ...) as WorkTable.

Like Sum, RangeSum treats nulls as zeroes.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi ,

I was wandering is it possible to sum numbers with null value from two excels and condition A1 + A2 >0

Tab_1:

Name     A1     A2

XXX       20     30

YYY      1     3

ZZZ        0     0 

Tab_2:

Name      A1      A2

XXX          7       0

e.g.

I would like to get a result of

XXX     20+7      30+0  = 27+30 = 57

YYY     7          0     = 7

XXX     57

YYY     7

sum ( (A1+A2)>0 A1 + A2 )  didn't work