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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Difference in summed values

Hi, I am trying to do some calculations of some GL codes, but I am getting different values depending on how I write the function.

The two ways I was writing the function are as follows -

sum({<GL_NBR={'*90115-*','*90210-*','*90220-*','*90225-*','*90230-*'}>} "GL_BAL_01" + "GL_BAL_02")

versus

sum({<GL_NBR={'*90115-*','*90210-*','*90220-*','*90225-*','*90230-*'}>} "GL_BAL_01")

+

sum({<GL_NBR={'*90115-*','*90210-*','*90220-*','*90225-*','*90230-*'}>} "GL_BAL_02")


The latter provides the correct value and there is a distinct difference in the returned value. Is this something to do with my data set? I would assume there would be no difference between the two calculations?


Thanks


1 Solution

Accepted Solutions
Digvijay_Singh

I think the first one will discard complete rows where one of GL_BAl_01 or Bal_02 is not having value

but 2nd one will consider those rows and add in Bal_01 or _02 whichever is present in such rows.

Check this sample, I could see the difference in values when used your expressions.

View solution in original post

1 Reply
Digvijay_Singh

I think the first one will discard complete rows where one of GL_BAl_01 or Bal_02 is not having value

but 2nd one will consider those rows and add in Bal_01 or _02 whichever is present in such rows.

Check this sample, I could see the difference in values when used your expressions.