Looping in alteryx
- 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 All,
I am a new alteryx user and need a little guidance here.
The issue I am facing is how can i use loops in alteryx - carrying out specific workflow until a condition is meeting.
example I am working with is :
Input | |||
ID number | Issue text | Location text | Area no |
123 | knee pain | wrist | AA1 |
123 | knee pain | leg | AB1 |
123 | knee pain | knee | AC2 |
456 | broken rib | rib | CD3 |
456 | broken rib | shoulder | GH2 |
789 | Sprained ankle | ankle | NY1 |
789 | Sprained ankle | wrist | ML3 |
789 | Sprained ankle | back | KO2 |
789 | Sprained ankle | shoulder | JH3 |
Output | |
ID number | Area no |
123 | AC2 |
456 | CD3 |
789 | NY1 |
The thought process which I had was for same ID numbers- run a fuzzy match for fields 'Issue text' and 'Location text'. For the fields which are matching, return the corresponding area number against the ID number.eg: for ID 123 only, fuzzy match 'knee pain' with 'wrist, knee, leg' and when matched with knee, return value AC2. This is how i would have coded in python with loops, variables and functions. Any idea on how I can do this with alteryx? The match needs to be inside ID as area changes with different combinations.
Thanks in advance!
Solved! Go to Solution.
- Labels:
- Fuzzy Match
- Text Mining
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Neha
Maybe a simple filter like this would work? Unless your actual data is messier:
contains([Issue text],[Location text])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Luke,
Thanks for your reply. My actual data is a little complicated than the sample data I posted here. Hence I thought of going with Fuzzy match instead of contains.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Neha ,
I am assuming that the "fuzzy" requires a lexicon of terms related to technical and non-technical terms. I've got a pain in my belly relates to gastro-intestinal discomfort. Given this nickname, you're going to need to first relate data into a nickname table. If you really want to use the fuzzy match tool, then you can look to:
C:\Program Files\Alteryx\bin\RuntimeData\FuzzyMatch\Nicknames\Common Nicknames.yxdb
GroupName|Name
Aaron|Erin
Aaron|Ron
Aaron|Ronnie
You would create the association table and store it in the same path.
Without the fuzzy match tool, you can perform the same type of lookups with either JOIN or FIND REPLACE options. But essentially, you'll need the "complex" table.
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @MarqueeCrew
Tried a variation of the solution you shared and it worked. The accuracy is at a lower end as of now but I think it will improve with time as we keep on adding entries to association table