Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum Total (Value 1 + Value 2) returning different results to Sum Total (Value 1) + Sum Total (Value2)

Hi All,

I have checked a scenario in set analysis expressions that Sum Total (Value 1 + Value 2) function is returning different value to sum total (VAlue1) + Sum total (Value2). Seems to be the second expression is returning correct value where as the first one isn't?

Can any one experienced this issue earlier? Is there any workaround to this issue or should have to live with using the latter set expression always?

Thanks, Srikanth

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You probably have some null values in Value1 and/or Value2. The result of these additons will always be NULL, regardless of the other value, so your first total is missing the values with null "partners". The second expression does not have this problem.

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

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You probably have some null values in Value1 and/or Value2. The result of these additons will always be NULL, regardless of the other value, so your first total is missing the values with null "partners". The second expression does not have this problem.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

There is no workaround needed. This behaviour is correct and by design and consistent with the null handling in other systems. You can also use:

     Sum(TOTAL Alt(value1, 0) + Alt(Value2, 0))

     or

     Sum(TOTAL RangeSum(Value1, Value2))

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

Thanks, that could be the issue. Have converted to number formats and tested both the expressions and they work perfectly.

Thanks, Srikanth