Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Creating a macro which maps account names

Dirk_Hattingh
5 - Atom

I have a file with account names which I wish to group into larger account groups.

 

The sample data shows the problem.  The Account names need to be grouped into Account groups.  The second table shows the mapping.  The idea is to see if the Account Name contains the lookup string, and if it does put the Account name next to this record.

 

I can do this by using a formula and the Contains function e.g.

 

If Contains([Account Name], "Auto",1)

then "Automotive"

else [Account Name]

endif

 

but this means manually creating this function hundreds of times (there are these many groups), and it will be very difficult to update at future iterations.

 

Can I do this with Alteryx by automating it somehow?  Any tips on how to do this?  Any questions happy to clarify.

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @Dirk_Hattingh 

 

You dont a macro for this 😅. You can just use find and replace 🙂 it can check if target string contains the required word and map it.

 

Workflow:

atcodedog05_0-1629389313828.png

 

Hope this helps : )

 

Dirk_Hattingh
5 - Atom

You sir, are a genius!  Thank you.

 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Dirk_Hattingh 

If the response helps please don't forget to mark it as solution.

Cheers and have a nice day!

Labels