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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.