Want to compare two list and flag yes if at least one number is matched
- 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
hello Everyone,
Need some help on to compare two list and flag yes if at least one number is matched like.
Input
Output
Thanks in Advance !
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Have you tried using the join tool and potentially split to columns/rows?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Ekmi9
Can you please paste the text input instead of screenshot.
Will be easy to copy and paste in Alteryx input to work on solution.
Many thanks
Shanker V
- 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
Hey @Ekmi9, here's how I'd go about this. We just split one list, check if the other contains that number and then flag accordingly. We can then just take the max flag for each RecordID (as this will be yes if so and no if no matches) and re-join:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
enclosed
- 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
- 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
Hi @Ekmi9
If your data is the same as your sample here, then I've got a one tool solution:
Since the items are single characters, then we can use the replacechar() function to feed them in as a list and compare the outcome. I did have to replace the comma with a ~ so that the comma wouldn't affect the outcome.
If your actual data isn't the same in structure, then @DataNath or @binuacs solutions will always work
Ollie
