Free Trial

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

new Alteryx formula

rjacobson
6 - Meteoroid

I'm wondering if someone can help me with a formula/tool to look at column ID and Acct below and create the 4th (Desired output) column?  I have about 30K+ rows of data with similar information in column 2 and 3.  The Desired output doesn't necessarily need to count up but needs to be unique for each id/acct group.

 As you can see Desired output = 1 is all matched because row 1 and 2 has the same Acct and therefore all IDs = 57559 and 57652 are grouped.

Similar, desired output 4 is grouped because acct 148996 linked to 57570 and 57742 and 180173 links 57570 and 57706

 

Thanks for any help

Rich

 

RowIDAcctDesired output:
15755952341
25765252341
3575591067881
4575591240031
5575591286611
6576521286611
7575593045061
8575593051621
955123123452
1055124123452
1155126223453
12575701453654
13575701489964
14577421489964
15575701490164
16575701490244
17575701539634
18575701801564
19575701801734
20577061801734
7 REPLIES 7
shancmiralles
11 - Bolide

hi! can you elaborate a bit more please ? thanks!

rjacobson
6 - Meteoroid

I'm trying to group IDs and Accts together if there is any equal values between rows.  For group 4, it's like an umbrella company that has 3 companies (IDs) and seven employees (Acct).  I need to use the information within ID and Acct to create that group = 4(Desired output:).

Does that help?

griffinwelsh
12 - Quasar

@rjacobson have a look at the attached solution. There is probably a simpler way to do this but this works.

rjacobson
6 - Meteoroid

WOW, that is cool! and thank you soo much.   I have an older version of Alteryx so I don't think I have batch or whatever that tool is before the join, but this seems to work well.

I modified it lightly changing the second summary tool to be Max of the RecordID and Joined that back to the original dataset by acct which worked as well.  

 

Again, thanks.  I've been thinking about how to do this for a few days.

Rich

 

griffinwelsh
12 - Quasar

@rjacobson glad this worked for you. That tool is an iterative macro that I built for this usecase. I believe you should have access to these. If you want to learn more about iterative macros check out the resources below:

https://help.alteryx.com/current/en/designer/apps-and-macros/macros/iterative-macro.html

https://www.youtube.com/watch?v=AByfTPqrUrQ

rjacobson
6 - Meteoroid

 

With my complete data set I'm now getting an error message 

iteration limit of 100 was reached

How do you open the interface designer - properties for the tool.  

 

I tried view/Interface designer, but nothing comes up

 

I believe I need this screen so that I can update the Max # of iterations but can't seem to get to it.

rjacobson_2-1725044804910.png

 

 

 

CoG
14 - Magnetar

You need to open the macro workflow (.yxmc) by right clicking the macro tool and selecting "Open Macro", and there you will find that menu in View -> Interface Designer -> Settings (Gear Icon).

 

Make the change and make sure to save the macro again before returning to the original workflow and running. A window should pop up saying that the macro has been updated.

Labels
Top Solution Authors