Splitting column by number of Rows

Hello, I have a number a columns of information that needs to be split and formed/pivoted into columns. You will see from the screenshot that the information is a list of items, cost, quantity etc. I need to be able to form this into columns so I can then stack them to form a list where each row contain the information for each item, so form them into line items.
It can’t be limited to a certain number rows, as each document that I upload into parabola may have a different number of items on it.
What would be good is if there was a way to say, pivot column on every 6th row, so something like that.
Any ideas will be appreciated.

Hi @Justin_Saunders :wave:

The Pivot columns step should help you achieve your desired output.

  1. Set the Column to pivot into new column headers field to Row Number (1).

  2. You can then set the Column with values to fill in field to Value.

The final output will place each unique Value in a separate column, creating a new row for every unique Row Number (1).

Let me know if that helps!

Thank you for your reply, I had to add new row numbers because if I didn’t it only took one row of each number so I ended up with a row of dollar values. But now with the row numbers the data is all spread out across multiple columns and it needs to be in only 5 columns, so the data needs to be in a 5 column table.

Thanks for clarifying @Justin_Saunders

In that case, use one more Add row numbers step before pivoting the data. Under the Numbering Settings, start at the top of the table and number based on Row Number (1).

After pivoting the data, use a Flip table step and your data should output as expected:

Here’s what the step sequence looks like:

Feel free to paste the snippet below anywhere into your flow to duplicate those step settings:
parabola:cb:fd50a36e-92f1-426e-9ba5-13602352a863

Let me know if that helps!

Thank you, that worked, everything is as I need it.

1 Like