SOLVED
IF Function
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mihir_mir_jb
8 - Asteroid
‎01-23-2020
02:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
Greetings for the day.
I have used IF function as below..
IF [Per Person Expense] <='25' THEN 'Yes' ELSE 'No' ENDIF
However in the output I am getting result as No for an expense which is less than 25. Ideally this should be Yes as per the formula.
Attached is an example.
Please help.
Thank you.
Solved! Go to Solution.
Labels:
- Labels:
- Connectors
6 REPLIES 6
17 - Castor
‎01-23-2020
02:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm guessing that the data type for [Per Person Expense] is a string, which means that <> would work like a dictionary sort.
Try tonumber([Per person Expense]) <= 25
‎01-23-2020
02:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you David for your reply.
When I prefix Tonumber it gives me error - Invalid type in operator <=.
sean_bolte_dup_544
8 - Asteroid
‎01-23-2020
02:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
17 - Castor
‎01-23-2020
03:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
you have to remove the quotes around 25, as @sean_bolte_dup_544 showed
‎01-23-2020
06:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much @sean_bolte
‎01-23-2020
06:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thankyou @DavidP
![](/skins/images/1AD6617C767659D8A9F9801BEDFCFB20/responsive_peak/images/icon_anonymous_message.png)