Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
cbushey1
Contributor III

Alternate States rounding issue

Hello there.

I am trying to understand why the returned value would be different between these two formulas.

SUM({$<Event_CurrentFlag = {1}, Event_ServiceCat = {250}>}Event_AllowedAmnt)

SUM({[Risk 1]*[Risk 2]*[Risk 3]*$<Event_CurrentFlag={1}, Event_ServiceCat = {250}>} Event_AllowedAmnt)

The only difference in these formulas is that the second allows for the union between 3 different alternate states (Risk 1, 2,3) and the current state ($). I can verify that all states have nothing selected. This is the returned values:

117,937,739

117,937,738.99995

Why does the second sum (the one with the alternates states) not return the value to the same precision as the first SUM?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Alternate States rounding issue

I think this will be helpful: Rounding Errors.

- Marcus

View solution in original post

4 Replies
boorgura
Valued Contributor

Re: Alternate States rounding issue

Where exactly are you using these expressions?

Is it possible for you to post a sample QVW?

cbushey1
Contributor III

Re: Alternate States rounding issue

I cant post a qvw but it really isnt needed.

This is just in a simple text box.

Event_AllowedAmnt is just dollars to the 2 digit decimal.

MVP & Luminary
MVP & Luminary

Re: Alternate States rounding issue

I think this will be helpful: Rounding Errors.

- Marcus

View solution in original post

cbushey1
Contributor III

Re: Alternate States rounding issue

Thanks for the link.

I still dont understand why the same calculation just introducing alternate states causes the calculation to be different but I was figuring I would need to introduce a round() function to resolve my issue. Thanks for confirming.