How can I differentiate one integer of one decimal number

Hi Team,
how can i solve this problem?

IF [number] is a decimal number
THEN “0”,
ELSE “1”

thks,

0 2 221
2 REPLIES 2

tony1
New Member

Hi @J_jvs. There’s no way to check that a value is a (whole) Number type or a Decimal type. But if you want to see if the number has a fractional part, you could do something like this: ABS([Number] - ROUND([Number])) > 0. See ABS and ROUND.

tvinci
New Member

I would also suggest using the left(), mid(), or right() functions. If you’re familiar with coding they work kind of like substring functions. Just compare the left() of one string to the left() of another string, so on and so forth.

Top Labels in this Space