SOLVED
If Contrains Expression help
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
pvara
8 - Asteroid
‎10-24-2019
12:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Need some help with the expression if the value 3 is contained in [Ref] then I would like "Y"
Not sure if the commas are causing an issue.
Solved! Go to Solution.
Labels:
- Labels:
- Expression
3 REPLIES 3
17 - Castor
‎10-24-2019
12:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@pvara try switching the positions of Ref and Ref1 in your formula. It's very confusing.
ArnavS
Alteryx Alumni (Retired)
‎10-24-2019
01:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi pvara,
Instead of using the Contains() Formula, I would try with the In() Formula.
For example: IF [Ref1] IN ([Ref]) THEN "Y" ELSE "N" ENDIF
Lets give this a try and see what happens.
Arnav
Alteryx
bpatel
Alteryx Alumni (Retired)
‎10-24-2019
01:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @pvara ,
in your formula your variables are in the wrong place. Ref should be first then Ref1
if Contains([ref], [ref1]) then "y" else "n" endif
Hope this helps!
