Convert data in row to columns

paulo01

New Member
Joined
Feb 28, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone.

I am doing an analysis of sales. The download includes product, revenue, cost of sale and quantity sold for every transaction.

However, there are also "bundled" sales whereby Bundle A = product X and product Y and product Z.

I have set up the data, so when the bundle name is recognised, it returns product X (rev, cost, quantity) on the row, product Y (rev, cost, quantity) on the same row next to that etc.

In my pivot, I have a calculated field where I sum the relevant columns to find the totals. But if I filter by product, I can only choose one column which is assigning the whole rows totals to that one product.

I want to transform the data in a single row that has multiple products so that its listed individually in rows.

However, there is no set number of products in each bundle (can be anywhere from 1 to 12).

If anyone know of a solution it would be much appreciated.

Thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,091
Office Version
  1. 2016
Platform
  1. Windows
In Power Query you can combine each set of 4 columns to one column with a delimiter (;)
With unpivot columns you can make one column with all your data and a title column wich can be removed.
Split your column on the delimiter (;)
remove blank rows
 

Watch MrExcel Video

Forum statistics

Threads
1,130,167
Messages
5,640,539
Members
417,151
Latest member
ChickenTenderer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top