If >= <= logic isnt working

I have a formula if( x >= '900700000' and x <= '999889999') then 1 else 0

The number 90284000 is showing up as a 1 when it shouldn't be. Why is this happening?

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I posted a reply, but just realised that it was incorrect. What is the data type for the field? I notice that you've got quotes around it, so is it text in the database? If it's a number are there any aggregations applied to the number as you'll need to take those into account in the formula? You could try converting it to a number in the formula using the to_integer function.

    Like 1
  • James Belsey Also, if it's a numeric type in the underlying database, don't use quotes in the formula, just use if( x >= 900700000 and x <= 999889999) then 1 else 0

Like Follow
  • 3 mths agoLast active
  • 2Replies
  • 18Views
  • 2 Following