Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Rounded value (1.6 become 1.0)

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

- Marcus

4 Replies

Re: Rounded value (1.6 become 1.0)

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

- Marcus

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) , '#,#')

Community Browser