IF statement with AND condition
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I need 2 conditions to be true before the formula can run. But its not working for me. Its acting as if its an "OR" statement. See example:
IF [A]<0 AND [B]>0
THEN 0
ELSE [A]/ [B]
ENDIF
I need both [A] to be less than 0 and [B] to be greater than 0 for the formula to return 0. As of now, when I run the model it wil return 0 if [A] is less than 0 OR [B] is greater than 0 What am I doing wrong?
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @janety0127
This appears to work fine on my end - I would be careful with your formula though, as you are allowing for division by 0, which will result in null!
Are you able to attach a workflow showing what you mean?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @janety0127
1. Kindly check your field Type to make sure it's not Byte
2. Your formula looks good. Kindly check for Typo or maybe you inadvertently have an <= versus < OR >= versus > in your argument
Cheers!
