cancel
Showing results for 
Search instead for 
Did you mean: 
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
Frequent Visitor

@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
Frequent Visitor

@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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.