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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rounding down instead of up

Hi,

Can someone explain how to stop chart rounding down incorrectly?

Ther raw data which the chart is referring to shows average to be 7.85; however, on the chart when we set to 1 decimal is rounding down to 7.8 when it should round up to 7.9.

Please help.

Chris

13 Replies
MK_QSL
MVP
MVP

=NUM(YourExpression,'#0.0')

linusblomberg
Creator II
Creator II

Can you use floor() or ceil()? or round()

tcullinane
Creator II
Creator II

set it to 3 or 4 places and what average is returned?

buzzy996
Master II
Master II

floor( x [ , base [ , offset ]] )

Rounding of x downwards to the nearest multiple of base with an

offset of offset. The result is a number.

Examples:

floor( 2.4 ) returns 2

floor( 2.6 ) returns 2

floor( 3.88 , 0.1 ) returns 3.8

floor( 3.88 , 5 ) returns 0

floor( 1.1 , 1 , 0.5 ) returns 0.5

Not applicable
Author

7.8500

Not applicable
Author

this could be quite an issue as we use averages a lot to score satisfaction. Is there not a general setting? and have others not come across this issue?

Chris

avinashelite

use floor(feildname) this will do

maxgro
MVP
MVP

=round(7.85 * 10/10, 0.1)               7.9

=round(7.85, 0.1)                             7.8

Anonymous
Not applicable
Author

Chris

This blog by hic explains the in & outs of rounding errors with binary floating point numbers:

     Rounding Errors

Regards,     Bill