Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

Rounded value (1.6 become 1.0)

Dear Community,

As we know, we can round the Million to 2 digits by :

num(1600000/1000000 , '#,#') =  1.6

or

num(1600000/1000000 , '#,0') = 2.0

Any method or function that can make this to 1.0 ?

For example:

xxx(1600000/1000000, 'xxx') = 1.0

or

xxx(1600000, 'xxx') = 1000000

Thanks and best regards,

Chanel

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Rounded value (1.6 become 1.0)

You could use floor() / and ceil() to round down/up.

- Marcus

View solution in original post

4 Replies
MVP & Luminary
MVP & Luminary

Re: Rounded value (1.6 become 1.0)

You could use floor() / and ceil() to round down/up.

- Marcus

View solution in original post

Not applicable

Re: Rounded value (1.6 become 1.0)

Hi,

It can be:

Num(Div(1600000,1000000),'#.0')

Makes 1.0. Hope this helps.

Not applicable

Re: Rounded value (1.6 become 1.0)

Appreciated for your help, Marcus!

Simple but useful solution ^^

Not applicable

Re: Rounded value (1.6 become 1.0)

Thanks for your response, I have done with Marcus solution above!

=num(floor(1600000/1000000) , '#,#')