Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Split purchased items associated with one orderID into multiple columns

Hello, 

 

I am trying to prepare data to perform a market basket analysis and want to know if it can be accomplished in PowerBI/PowerQuery. The database splits each order into a single row per ordered product, so if multiple products are purchased in a single order, the orderID is repeated for each product purchased. 

 

What I want to do is have one order ID and multiple columns for each product associated with the order.

 

Basically like this:

 

Is this possible in PowerBI/Powerquery? I just got it to work in R but curious if I could do it with the PowerBI GUI.

 

Many thanks!