I have a large dataset like below;
SKUs are not unique, same SKU belongs to different levels.
I lose the connection between SKUs when I sort the data, so I'm trying to map it with unique IDs like this, so I can identify which higher levels they belong to;
.1 = 1A until the next .1 found, then becomes 1B, 1C, etc
..2 = 1A2A
...3 = 1A2A3A
...3 = 1A2A3B
..2 = 1A2B
.1 = 1B
Any ideas how to achieve this?
Thanks in advance!

