IN function inA
- 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
in other softwares, I can write the code like this DOB_YEAR NOT IN (1900:2015)
How can I write in alteryx?
please help.
thanks
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@lakshmidirisala
To my knowledge, Alteryx doest not have exact same function but can definitely achieve it easily as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @Tyro_abc ,
That is for sure a creative idea. I believe @lakshmidirisala is looking for a range rather than two specific years.
I adjusted your workflow Reg expression to look for a range see attached.
But I also think that may not play very well with @lakshmidirisala as he is looking for something to
mimic a range or sequence as it is the case in Python and R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ImadZidan,
I also believe that @lakshmidirisala is looking for.
Probably the easiest solution and fastest at the same time is the one provided by @Qiu as it will be the fastest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ImadZidan yes, I agree. I do have doubt on the original requirement whether that is range like we do in Python or is that something like SQL Where clause. In either way, at least one of the solutions we provided should work.
Best Regards
Arundhuti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @lakshmidirisala, solutions posted by others on this thread are a great way to replicate the NOT IN function you are looking for in Alteryx. Having said that, Alteryx does support IN (or NOT IN) function within its tool but not in the way you are looking to replicate by giving the start and end year (i.e. range). You will have to explicitly build out your NOT IN statement values within quotes and include them in your formula. Something like the screenshot below:
The NOT IN year values are hard-coded in my sample screenshot above, but if you wanted to make it dynamic, Dynamic Formula tool available as part of CREW Macros can do that for you. I hope this helps and thank you for posting your question on the Community!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How about:
left([dob_year,) >= "1990"
AND
left([dob_year,) <= "2015"
cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
