Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting an output to a integer

Hi,

In an expression I am using ' / ' (divide) operator.

I want to limit the output to a integer.

How can I do it

Regards,

Rohit

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

If you are dividing a number by number it obviously return number.

i`m not able to understand the problem .

Can you pl ellaborate a bit and post your expression as well here.

-Peretson

View solution in original post

6 Replies
Not applicable
Author

Hi,

If you are dividing a number by number it obviously return number.

i`m not able to understand the problem .

Can you pl ellaborate a bit and post your expression as well here.

-Peretson

Not applicable
Author

Thanks Kevin for showing interest.

Actually I want to exclude the digits after the decimal.

Is that possible

Not applicable
Author

hi,

use div() function

ex:div(n1,n2)

thanks

Not applicable
Author

Hi,

You can use num() function to format you expressionn output.

like num(sum(Sales),'#,##')

if you are using charts you can go to number tab and format you o/p.

- Peterson

Not applicable
Author

Thanks a lot for your replies..

div(n1,n2) worked..it was great

Not applicable
Author

Hi,

If you are dividing a number by number like this:

=5/3

Ans: 1.6666666666667

If you need to make limit like this:

=num( 5/3, '0.00' )

Ans: 1.67

Is it your answer?

i think i m not able to understand the problem .

Zaman