cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
saipawar
Helper IV
Helper IV

transpose multiple date columns into rows

Hi,

My current table looks like this where I have dates as column headers. I would like to transpose the date columns into rows and thus transpose the data in each of the date columns as well. Second image is the expected output of the query - 

 

social1.PNG

 

social2.PNG

 

Thanks!!

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @saipawar,

On the query editor select all the columns you needs to transpose and make the unpivot that will give you the resultthat you expect.

Check documentation below:
https://support.office.com/en-us/article/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221...

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

ScottShearer
Resolver I
Resolver I

@saipawar 

I agree with the solution provided by @MFelix but would like to add that when you select your column to unpivot and right click, you need to be sure to select "Unpivot only selected columns" in order to get the results you want.

Unpivot.png

 

 

View solution in original post

3 REPLIES 3
saipawar
Helper IV
Helper IV

Thank you Felix and Scott!! This did the trick!! 

ScottShearer
Resolver I
Resolver I

@saipawar 

I agree with the solution provided by @MFelix but would like to add that when you select your column to unpivot and right click, you need to be sure to select "Unpivot only selected columns" in order to get the results you want.

Unpivot.png

 

 

MFelix
Super User
Super User

Hi @saipawar,

On the query editor select all the columns you needs to transpose and make the unpivot that will give you the resultthat you expect.

Check documentation below:
https://support.office.com/en-us/article/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f588221...

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors