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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Column headers to be in rows

Hi Experts,

 

I have the below table for employee availability,  and I would like to have the time in column headers to be in the rows so that Adam has 3 rows for the the 3 periods. Also, I will be updating this file so that dates in the header change and I dont want it to mess the query.

 

Alternate Format NameAvailability % 15 Jan 2023 - 21 Jan 2023Availability % 22 Jan 2023 - 28 Jan 2023Availability % 29 Jan 2023 - 4 Feb 2023
Adam0.00%0.00%0.00%
Shady0.00%0.00%0.00%
Ralf0.00%0.00%0.00%
Will0.00%0.00%0.00%
Sharon0.00%0.00%

0.00%

 

 

Optimal result:

 

Alternate Format NameTime periodAVAILABILITY
AdamAvailability % 15 Jan 2023 - 21 Jan 20230.00%
AdamAvailability % 22 Jan 2023 - 28 Jan 20230.00%
AdamAvailability % 29 Jan 2023 - 4 Feb 20230.00%
ShadyAvailability % 15 Jan 2023 - 21 Jan 20240.00%
ShadyAvailability % 22 Jan 2023 - 28 Jan 20240.00%
ShadyAvailability % 29 Jan 2023 - 4 Feb 20240.00%

 

 

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@Anonymous ,

1. Go to Power query editor and select these 3 columns in the your table.

Arul_0-1677493126927.png

2. Right click on any of the selected columns and do unpivot columns.

Arul_1-1677493190308.png

3. You will get the desired result.

Arul_2-1677493224082.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@Anonymous ,

1. Go to Power query editor and select these 3 columns in the your table.

Arul_0-1677493126927.png

2. Right click on any of the selected columns and do unpivot columns.

Arul_1-1677493190308.png

3. You will get the desired result.

Arul_2-1677493224082.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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