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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Table transpose in Power Query

Hello,

I have the following table in Power Query and i am trying to obtain the transpose using Power Query.

 

Start dateStockReturnsDefectiveCategory
01/05/20216917Late
27/05/20222510On time
07/08/20225615On time
14/07/20225615Undefined
08/08/2022348No action
12/08/20222210Late
17/08/20227822On time
20/08/20223313No action
22/08/20226318Late
29/08/20223314On time
18/09/20223314Undefined
07/09/20222717No action
16/09/20223722On time
20/10/20229316On time
23/11/20227520Late
11/12/20229818No action
04/01/20236716On time
17/02/202371434On time
11/12/20229818No action

 

I tried the Transpose option in Power Query but the first column as shown below with the headers is missing.

 

Expected results:

 

Start date01/05/202127/05/202207/08/202214/07/202208/08/202212/08/202217/08/202220/08/202222/08/202229/08/202218/09/202207/09/202216/09/202220/10/202223/11/202211/12/202204/01/202317/02/202311/12/2022
Stock6255327363323979679
Returns95664283333773587148
Defective1710151581022131814141722162018163418
CategoryLateOn timeOn timeUndefinedNo actionLateOn timeNo actionLateOn timeUndefinedNo actionOn timeOn timeLateNo actionOn timeOn timeNo action
1 ACCEPTED SOLUTION
edhans
Super User
Super User

Before you transpose, demote the headers.

  1. Click the dropdown for Use First Row as Headers
  2. Select Use Headers as first row

then transpose

edhans_0-1663693997298.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

I agree with @Greg_Deckler , but hard to know based on your post what you are doing. This could be an interim transformation for a merge or something, or it could be the end result needed for an Excel table, which would be fine.

But if this is the end result for a Power BI model, your original table is more along the lines of what Power BI works well with.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Greg_Deckler
Community Champion
Community Champion

@Anonymous Also, just to add to what @edhans said. I am fairly certain that you might want to reconsider transposing that table to begin with as the original format it is in is far more compatible with Power BI. In fact, I think it would be better if you unpivoted your Stock, Returns and Defective columns. I may be wrong, but if I had that data and wanted it to be easy to work with in Power BI, that's what I would probably do.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
edhans
Super User
Super User

Before you transpose, demote the headers.

  1. Click the dropdown for Use First Row as Headers
  2. Select Use Headers as first row

then transpose

edhans_0-1663693997298.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.