Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert a float field to integer

Hello, everyone.

I need help how i can to convert a float field to integer.

this is my field

Captura.JPG

Thanks,

Regards.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Your ABSAT field is a text field. before you can use numerical functions like rounding functions, you need to interpret it as number, using num#(). When using num#() you need to specify a correct format code and you may need to specify the separators if they differ from your defaults.

This seems to work for me (only one distinct ABSAT value contained in the QVW to test):

round(num#(ABSAT,'#,#',',','.'))

View solution in original post

7 Replies
swuehl
MVP
MVP

Have you tried a rounding function like ROUND(FIELD), CEIL(FIELD), FLOOR(FIELD)?

Anonymous
Not applicable
Author

Now , try it but did not work.


Num#(ABAST,'0.0')

Num(ABAST,0)

Num(ABAST)

Rount(ABAST)

Floor(ABAST)

and CEIL(ABAST)



swuehl
MVP
MVP

Could you upload a small sample QVW that shows your issue / field?

Anonymous
Not applicable
Author

Of course, thanks.


swuehl
MVP
MVP

Your ABSAT field is a text field. before you can use numerical functions like rounding functions, you need to interpret it as number, using num#(). When using num#() you need to specify a correct format code and you may need to specify the separators if they differ from your defaults.

This seems to work for me (only one distinct ABSAT value contained in the QVW to test):

round(num#(ABSAT,'#,#',',','.'))

Anonymous
Not applicable
Author

Thank you very much swuehl , is working perfect.

Regards.

FGee
Contributor II
Contributor II

A round function works pretty well for your problem.  Other useful functions are the ceil and floor function depending on how exactly you would want to manipulate your data.