Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gayathridevi24
Contributor III
Contributor III

Round Function

Hi All,

I am having doubt in round() function. Please find the below results of round functions.

Round(8,6)=6

round(9,6)=12

round(10,6)=12

round(10,4)=12.

Could you please explain how round function works for the above results.

Thanks in advance.

 

Thanks and Regards,

Gayathri Devi

Labels (1)
1 Solution

Accepted Solutions
nikitadeshwal
Partner - Contributor III
Partner - Contributor III

Gayathri,

Please find below information

Round() function returns rounding a number to the nearest multiple of step shifted by an offset number.

and if number to round is exactly middle, it is rounded upwards.

Round(8,6)=6 ............nearest multiple of 6 to 8 is 6

round(9,6)=12............nearest multiple of 6 to 9 is 6,12(Taken upwards)

round(10,6)=12..........nearest multiple of 6 to 10 is 12 

round(10,4)=12..........nearest multiple of 4 to 10 is 8,12(Taken upwards)

You can also find examples here

https://help.qlik.com/en-US/sense/February2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Gener...

Regards,

Nikita Deshwal

View solution in original post

3 Replies
nikitadeshwal
Partner - Contributor III
Partner - Contributor III

Gayathri,

Please find below information

Round() function returns rounding a number to the nearest multiple of step shifted by an offset number.

and if number to round is exactly middle, it is rounded upwards.

Round(8,6)=6 ............nearest multiple of 6 to 8 is 6

round(9,6)=12............nearest multiple of 6 to 9 is 6,12(Taken upwards)

round(10,6)=12..........nearest multiple of 6 to 10 is 12 

round(10,4)=12..........nearest multiple of 4 to 10 is 8,12(Taken upwards)

You can also find examples here

https://help.qlik.com/en-US/sense/February2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Gener...

Regards,

Nikita Deshwal

gayathridevi24
Contributor III
Contributor III
Author

Thank you so much for reply Nikita. It was very useful.

gayathridevi24
Contributor III
Contributor III
Author

Hi Nikita,

It would be very helpful if you explain Num() function also.

Please find the below results of NUM().

Num(11111.111,'#,##0',',',' ')=11111,110

Num(111.11,'# ##','.',' ')=1 11

Num(1.11,'# #0',',',' ')=1

Could you please explain how it works.

Thanks and Regards,

Gayathri