Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AndrewGBale
New Member

Transform several groups of columns

I have a row of data describing an order - first several columns on a customer, then 4 columns on product 1, 4 columns on product 2, etc up to 15 products.

 

I need to transform this into one row per product, each row consisting of the same customer data, and the 4 columns for the product.

 

So if the customer had 3 products in their order, there would be 3 rows, the first for product 1, the second for product 2 etc. each with the same first columns describing the customer.


Am drawing a blank on this conversation.  Any assistand gladly received!!

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @AndrewGBale ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @AndrewGBale ,

 

Try to use unpivot

1.png

2.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

watkinnc
Super User
Super User

I would select all of the Cistomwr columns, then click "Unpivot Other Columns".

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
Jos_Woolley
Solution Sage
Solution Sage

Hi,

How are the product columns named? Are they of the form, for example:

"Product 1 Name", "Product 1 ID", "Product 1 Qty", "Product 1 Cost"
"Product 2 Name", "Product 2 ID", "Product 2 Qty", "Product 2 Cost"

...

etc., so basically identical apart from the product name?

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors