Forum Discussion

richochet's avatar
richochet
New Member
4 years ago

Create new rows from rows where there are additional entries

I'm not sure how to describe what I'm trying to do so the answer might already be out there.  I have a list of payments generated from the Stripe payment system.  If the customer ordered more than one item then there are more column entries on the same row for that customer e.g. Order One, Order Two, Order Three.  There are some orders with 8 items ordered.  In the column is the name of the item, the cost and the quantity.  Some customers only order one item, so the columns for the additional orders will be empty.  I would like to take the rows with the additional items and create new rows putting the item in order one column and filling out all the other fields that are completed e.g. customer name, transaction number etc.  I then wish to split the order one column so I can anaysle the payments and fees somehow.

 

Can anyone point me in the right direction of a tutorial on what I'm trying to do?  Has anyone used Power Query to maniupulate the stripe exports to do something similar?

 

My aim is to balance the payments recieved against the orders and fees.  This is for a charity I do some work for.

 

Many thanks

 

Jacqui

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey there.

    Sound like a classic Table.Unpivot or Table.UnpivotOtherColumns scenario, followed by Table.Splitcolumns to get the Item, Quantity, and Cost Values into Columns. 

    --Nate