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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
zebrapineapple
Regular Visitor

Splitting a column by category into new columns

Hello everyone

Looking for a little help for something I thought would be easier!

 

I have data that I need to split a column out into new columns based on the catergories within.

Basic example shown below and how I need to turn it:

 

 

zebrapineapple_0-1647614037973.png

 

Now on a visual level I can get what I need with a matrix but I would like it available in a data table so I can add more calc columns and lookups to other things.

I've tried transpose and unpivot in Power Query but that doesnt work.
I've tried a summary table but i dont think you can split a column.

 

I'm going to try a summary table and a lookup to the original, see if that works.

 

If anyone has any ideas please let me know!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, 

 

Pivoting the table should give you the result you're after. 

 

Original Data

WaqarArshad_0-1647615576694.png

 

Pivoted Data

WaqarArshad_1-1647615596476.png

 

Select the category column in query editor and click on "Pivot Colum" and use "Value" column for values

WaqarArshad_2-1647615724707.png

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, 

 

Pivoting the table should give you the result you're after. 

 

Original Data

WaqarArshad_0-1647615576694.png

 

Pivoted Data

WaqarArshad_1-1647615596476.png

 

Select the category column in query editor and click on "Pivot Colum" and use "Value" column for values

WaqarArshad_2-1647615724707.png

 

 

Ahhh I was using un-pivot so I needed to do the opposite!
Confusingly I had already un-pivoted the data so I was trying to un-pivot it again - instead the data has now been un-pivoted now pivoted!

PVO3
Impactful Individual
Impactful Individual

Select the category column in PQ and use the pivot Column button

PVO3_0-1647615641706.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.