Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Insert New Line Numbers with an attached Letter without impacting 1-N sort

hellyars
13 - Pulsar

Silly sort question.

 

I have a set of data that has a Line Number (LN).  The sequence is 1 to 999.  BUT, I need to insert new lines without conflicting with the existing LN assignment.  There's only one problem the new lines will have a letter A-Z attached to it (thought A-D is most likely the extent in the real world data).  The new lines come in from a different data flow.  This applies to multiple accounts, where each account has a 1-N different number of original LNs

 

 

ORIGINAL LNsWITH NEW LINES
11
22
33
43A
54
65
76
87
 7A
 7B
 7C
 8
  
7 REPLIES 7
Qiu
21 - Polaris
21 - Polaris

@hellyars 
Would Join by position help?
and how do you insert new lines? what is the Joining Key?

hellyars
13 - Pulsar

I add the new lines with a simple Union tool.  I then want to sort so the thew LNs with the letters sort in relative order

PhilipMannering
16 - Nebula
16 - Nebula

Can't you just use the sort tool? If you don't want to change the order of the other fields then you'll need to isolate that field (with the Select Tool) > Sort > and then join back on (use Join by Record Position)

hellyars
13 - Pulsar

@PhilipMannering  LN is string.  20A sorts between 208 and 212 instead of between 20 and 21.  If I switch it to a Double it sorts correctly, but it drops the A.  I guess I can play with that angle.

PhilipMannering
16 - Nebula
16 - Nebula

Good point!

 

Try ticking the "Use Dictionary Order" in the Sort Tool. 🙂

PhilipMannering_0-1605234180579.png

 

Qiu
21 - Polaris
21 - Polaris

@hellyars 
Use the "Use Dictionary Order" option for sorting should do it.

hellyars
13 - Pulsar

@PhilipMannering  Totally worked in Alteryx.  Tableau, however, did not like it.  But, I can cheat and now add a RecordID to fix it in order. 

Labels
Top Solution Authors