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 LNs | WITH NEW LINES |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 3A |
5 | 4 |
6 | 5 |
7 | 6 |
8 | 7 |
7A | |
7B | |
7C | |
8 | |
Solved! Go to Solution.
@hellyars
Would Join by position help?
and how do you insert new lines? what is the Joining Key?
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
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)
@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.
Good point!
Try ticking the "Use Dictionary Order" in the Sort Tool. 🙂
@hellyars
Use the "Use Dictionary Order" option for sorting should do it.
@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.