SOLVED
Comparing multiple values from 2 columns
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
Dilver_Shaik
7 - Meteor
09-01-2022
01:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Team, need help with below scenario how to get in Alteryx. Below is my source data
| Branch ID | Head ID | Branch | Head |
| 12345 | 67890 | Mexico, Columbia, Delhi, Paris | Columbia, Paris, Rome, Italy, New York |
| 09576 | 12658 | Srinagar, Chennai, Hyderabad | Hyderabad, Chennai, Mumbai, Pune |
Expected Output is to display the values that are in Branch and not in Head i.e., Mexico & Delhi for the first row.
| Branch ID | Head ID | Branch | Head | Difference |
| 12345 | 67890 | Mexico, Columbia, Delhi, Paris | Columbia, Paris, Rome, Italy, New York | Mexico, Delhi |
| 09576 | 12658 | Srinagar, Chennai, Hyderabad | Hyderabad, Chennai, Mumbai, Pune | Srinagar |
Any help is much appreciated.
Thanks & Regards
Dilver
Solved! Go to Solution.
Labels:
- Labels:
- Developer
- Dynamic Processing
- Regex
2 REPLIES 2
17 - Castor
09-01-2022
01:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's one way you could go about this @Dilver_Shaik. This approach:
1 - Splits out all of the branches into their own rows
2 - Filters out records where either field is empty (useless comparison) and then also those where head contains branch
3 - Summarizes to re-concatenate the remaining 'Branch' as [Difference]
4 - Re-joins to the main dataset for the original Branch details
09-01-2022
04:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @DataNath - It Works
