Forum

Pivot/Unpivot non-n...
 
Notifications
Clear all

Pivot/Unpivot non-numeric data

6 Posts
3 Users
0 Reactions
213 Views
(@baxbax)
Posts: 125
Estimable Member
Topic starter
 

Hi,

I have a file that contains product specifications. The specifications are for different categories. The category headings are in one column and their value is in another. There are multiple rows of data for each product. The number of categories for each product can vary. 

I have attached an example file that shows the source data and an example of the result required. What I need to do is get the values in the Category field to be column headers and then have the data from the Value column appear in the columns. When I try to pivot or unpivot the data I can get the column headers but the values appear as 0 or 1 not the actual data values.

Is there any way to do this in Power Query?

Thanks

 

Mark

 
Posted : 21/03/2019 4:44 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Mark,

In Power Query Editor, select the Category column and in Transform menu, click Pivot Column.
In the dialogue box, pick Value as the column that contains the value data and click on Advanced options and select Don't aggregate in the drop down list.
Click OK and you have your data as you want it.

See attached file for an example.

Br,
Anders

 
Posted : 21/03/2019 4:16 pm
(@baxbax)
Posts: 125
Estimable Member
Topic starter
 

Hi Anders,

Exactly what I needed. I knew it was possible but was missing the Don't aggregate values piece. Thanks for taking time to provide an answer, greatly appreciated.

Thanks

 

Mark

 
Posted : 22/03/2019 5:00 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Mark,

Thanks for the feedback. It is just a pleasure to be able to give some help.

Br,
Anders

 
Posted : 22/03/2019 3:59 pm
(@orecaboy)
Posts: 2
New Member
 

i have the similar case which i already created a separate topic. 

This one doesn't seem to work maybe because i have a different format? much appreciated if you can also help on mine Anders, thank you very much. 

Here is my post

 
Posted : 10/12/2020 12:19 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

Catalin has provided an answer to your post, do check if that works as you want.

Br,
Anders

 
Posted : 10/12/2020 2:24 pm
Share: