Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cbushey1
Creator III
Creator 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
marcus_sommer

I think this will be helpful: Rounding Errors.

- Marcus

View solution in original post

4 Replies
boorgura
Specialist
Specialist

Where exactly are you using these expressions?

Is it possible for you to post a sample QVW?

cbushey1
Creator III
Creator III
Author

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.

marcus_sommer

I think this will be helpful: Rounding Errors.

- Marcus

cbushey1
Creator III
Creator III
Author

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.