Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format Numbers To Integer

Hello,

Apologize as this might be a simple question.  I'm trying to format numbers in Edit Script so that float numbers is converted to Integer.  Which function does this trick?

Your help is much appreciated!

1 Solution

Accepted Solutions
Not applicable
Author

Round( value)

Ceil ( value)

Floor( value)

View solution in original post

2 Replies
Not applicable
Author

Round( value)

Ceil ( value)

Floor( value)

swuehl
MVP
MVP

If you only want to format the field, but keep the floating point number internally, use

...

num(FIELD,'0') as FIELD,

...

If you want to keep only the integer part, use

..

floor(FIELD) as FIELD,

...

to truncate to integer

or

...

round(FIELD,1) as FIELD

...

for a rounded integer.

Hope this helps,

Stefan