Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

round function

how we apply the round function in chart,and operate through slider.

1 Solution

Accepted Solutions
9 Replies
ali_hijazi
Partner - Master II
Partner - Master II

use ceil or floor functions for rounding up or down respectively

I can walk on water when it freezes
Not applicable
Author

ceil

ashfaq_haseeb
Champion III
Champion III

Hi,

Check this for better understanding.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors

Regards

ASHFAQ

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Are you sure you want to use the round function? It may be that you can achieve what you're looking for by setting the number format of your expression. To do this, in the chart properties, go into the Number tab.

Not applicable
Author

first i round the values in chart and this will operate with the help slider..and after number tab what can i do?

marcus_malinow
Partner - Specialist III
Partner - Specialist III

I'm not sure what you're trying to achieve with your slider. Can you explain please?

Not applicable
Author

simply with help of slider we can change the values in chart..first ,how to use the round function in charts.

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Ok if I understand you correctly, this may be one way.

Set up two variables:

vNumberOfDP - use this in your slider

vNumberFormat - set this to this expression

='#0.' & Left('0000000000', $(vNumberOfDP))

Then in your expression:

=num([existing expression], '$(vNumberFormat)')

vardhancse
Specialist III
Specialist III

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

Rounding of x upwards to the nearest multiple of base with an offset of offset. The result is a number.

Examples:

ceil( 2.4 ) returns 3

ceil( 2.6 ) returns 3

ceil( 3.88 , 0.1 ) returns 3.9

ceil( 3.88 , 5 ) returns 5

ceil( 1.1 , 1 , 0.5 ) returns 1.5

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