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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Power Query Unpivot help!

Hi there,

 

I have data which I need to unpivot as shown below:

 

UNPIVOT HELP.PNG
Please note there are many customers and attibutes, so I don't want to split into seperate queries! is it possible within a single query?

 

Thank You so much!

 

Alex

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , refer if this blog can help

https://kohera.be/blog/power-bi/how-to-unpivot-twice/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

TomMartens
Super User
Super User

Hey @Anonymous 

 

to achieve what you want, you need three steps.

This is how my sample data looks like

image.png

First step, unpivot the columns CA-A1 - CX-AX then your table will look like this:

image.png

Second Step - Split the column Attribute in 2 columns:

image.png

select the proper delimiter, maybe it's " - " on your data, here it's just the dash, after that your data will look like this:

image.png

Third step
Mark the column that contains all the attributes, here its Attribute.2 and Pivot the column, choose Value column for the values:

image.png

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @Anonymous 

 

to achieve what you want, you need three steps.

This is how my sample data looks like

image.png

First step, unpivot the columns CA-A1 - CX-AX then your table will look like this:

image.png

Second Step - Split the column Attribute in 2 columns:

image.png

select the proper delimiter, maybe it's " - " on your data, here it's just the dash, after that your data will look like this:

image.png

Third step
Mark the column that contains all the attributes, here its Attribute.2 and Pivot the column, choose Value column for the values:

image.png

Hopefully, this provides what you are looking for.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
amitchandak
Super User
Super User

@Anonymous , refer if this blog can help

https://kohera.be/blog/power-bi/how-to-unpivot-twice/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you I was able to solve my problem with the help of this link! 🙂

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.