Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Custom Sorting for an indented bill of material

michstr
5 - Atom

I'm trying to do a custom sort with an indented bill of materials and figured I reach out and see if anyone has done something like this already.  

 

I have an existing dataset with an indented BOM formatted like this example:

Assy PartLevelComponentItem numberAssembly
1000-01.11000-21001Y
1000-01.1100-234002Y
1000-01.1ABC-56003 
1000-01.1ABC-2004 
1000-01.1XYZ.001005 
100-234..222-2424001 
100-234..2XYZ.001002 
100-234..2100-345003 

 

I would like to re-sort this by indenting the assembly like this:

Assy PartLevelComponentItem numberAssembly
1000-01.11000-21001Y
1000-01.1100-234002Y
100-234..222-2424001 
100-234..2XYZ.001002 
100-234..2100-345003 
1000-01.1ABC-56003 
1000-01.1ABC-2004 
1000-01.1XYZ.001005 

 

Note that this could be further compounded because there could be another assembly under the 100-234 part.  

3 REPLIES 3
c-lopez
Alteryx
Alteryx

Hi @michstr,

 

I am afraid we will need more detail to be really helpful, or more data samples but at face value if you want the table to look the way you have it on the bottom you can accomplish this with just a sort tool

Snag_34b973c7.png

Looking forward to helping you more,

 

Regards

michstr
5 - Atom

Thanks.  I'll try to come up with a more detailed example to help.  

michstr
5 - Atom

I've added some additional complexity to my example.  I don't think this can be accomplished with a sort.  

 

Existing   
Assy PartLevelComponentItem number
1000-01.11000-21001
1000-01.1ABC-56002
1000-01.1100-234003
1000-01.1ABC-2004
1000-01.1XYZ.001005
100-234..222-2424001
100-234..2XYZ.001002
100-234..2100-345003
100-345…3100-346001
100-345…3100-348002
100-345…3100-360003

 

Desired   
Assy PartLevelComponentItem number
1000-01.11000-21001
1000-01.1ABC-56002
1000-01.1100-234003
100-234..222-2424001
100-234..2XYZ.001002
100-234..2100-345003
100-345…3100-346001
100-345…3100-348002
100-345…3100-360003
1000-01.1ABC-2004
1000-01.1XYZ.001005
Labels
Top Solution Authors