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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Check if value is an integer

Hello,

Is it possible to check if a value is an integer when loading the data? I need to divide the number if it's not an integer and do nothing when the number is an integer.

Regards,

Johan

4 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

If(Len(PurgeChar(Value, '1234567890')) = 0, 'Integer', 'Non Integer')

Hope this helps you.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

You can simply use

Num(KeepChar(Value, '1234567890')) AS NumberField

Not applicable
Author

I usually do something like this:    if(myfield=round(myfield),'integer','not integer')

Not applicable
Author

Thanks for all your suggestions. I tried if(frac(MyNum)=0 and it did the trick.