Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

sdealtrey
New Contributor

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


Tags (1)
1 Solution

Accepted Solutions
Digvijay_Singh
Honored Contributor III

Re: Difference in summed values

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.

1 Reply
Digvijay_Singh
Honored Contributor III

Re: Difference in summed values

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.

Community Browser