Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

On rounding errors: confusing display of results

QlikView 10-SR1 64bit, Win7 64bit

I read
http://community.qlik.com/wikis/qlikview-wiki/explanation-of-mathematical-errors-in-qlikview.aspx
and understand that QlikView can get rounding wrong.

However, I would expect for QlikView to just show me a number rounded differently, instead it's showing me something different then what it's using internally, and this I don't understand. See attached doc for example.

ie:

1844 / 365 -> QlikView will show as result: 5.0520547945205

round(1844/365,0.1) -> QlikView will show as result: 5.1

round(1844/365,0.1) - 5.1 -> QlikView will show as result: 8.8817841970013e-016

Question is why QlikView doesn't use exponential notation for round (1844/365,0.1) too? Why does it show me 5.1, when it's not 5.1 for QlikView?

Since round() is so random, what method are you using to just drop decimals instead of rounding?

Is

num#( ..... , 'format code with 1 decimal')

the preferred way to drop decimals (1.33333 -> 1.3) w/o surprises ?

Thanks

1 Reply
Not applicable
Author

Hi , A quick solution for this is in the properties in the Number Tab set your expressions to integer. Hope you will overcome the problem which you are facing.

Regards,

Chakravarthy.