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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Frac() statement

Hi,

frac(5.32) gives me 5.320000000000013 instead of 0.32.

can anyone explain to me why this is?

thanks

Labels (1)
6 Replies
Anonymous
Not applicable
Author

What version are you on ? Qv 11 SR2 (64bit) returns 0.34

Jonathan

Not applicable
Author

Hi,

I am current on QV v11 SR2 (32bit). I am having other problems with it like the images don't display, so this might just be a version problem.

thanks

Anonymous
Not applicable
Author

I found with SR1 that after a reloading sheet objects didn't refresh as expected. Closing and then reopenning the document helped.

Not seen it on SR2 yet but see if a restart of the document helps.

Jonathan

Not applicable
Author

I don't think it's a bug, but floating point calculation. See also http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors

rbecher
Partner - Master III
Partner - Master III

v11.2 SR5 shows the correct result..

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author


Hello,

frac(5.32) works but not frac(29.01).

2014-05-14_10h10_55.png

You have to round frac function to have the good result.

It's not a Qlikview bug but an interpretation of the rounded number. See my post above.