Repeating row number for multiple rows

I have some data that has a column for a name and within that column there could be multiple rows with the same name as well as rows with different names, see screen shot. each row will have further columns with other data. I need to be able to filter rows to group the rows with the same name but can not work out how to do it. as you can see from the screenshot I have managed to add row numbers based on the name column. Now I need to separate out the names into different columns/arms of my flow. This is just a sample of data, there will be differing amounts of rows with the same name. In the screen shot you will see that the rows current run from 1-10 for each name.

What would be handy is if you could add row numbers based on a certain column as you can, but you could choose to have the same row number for the same name. So Chic/Mack would be row number 1 and Chic/Sal would be labelled 2. Then you would be able to filter the rows by number. If anyone can tell me how to do that, or acheive what I am aiming to acheive, I would appreciate it.

Hey @Justin_Saunders :wave:

We can accomplish a repeating row number for each unique column value by following an approach similar to the one you see here:

Removing duplicates and then inserting row numbers allows us to assign each item with its unique row number:

We can then use the Combine Tables step to append the row number to the corresponding recipe item:

Hope this helps! Let me know if you run into any questions.

1 Like

thanks Adam,

the issue with that is that each row will have other data associated with it and each row will have unique data associated with it. So if I remove the duplicate rows, then I will loose all that extra data. Unless I am not understanding anything. You can see what I mean from the screen shot below.

No problem Justin!

We can still take the same approach for adding row numbers even with unique data in other columns – all we need to add is a “Select Columns” step so that our deduped data just contains the row number and merge column.

I put together a quick video explanation here – let me know if this does the trick!

Thanks @Adam_R that works perfectly

1 Like

@Adam_R are you able to look at peoples flows and check if they are an efficient way of doing what they are aiming to achieve? Or do I need to just post on here what I am wanting to achieve and how I am achieving it to see if anyone has more efficient ways of doing it?

Sure thing! Feel free to send a link to your flow to support@parabola.io and we’re happy to take a look and recommend best practices/ more efficient approaches.