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

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

@sabry_303 ,

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!




View solution in original post

1 REPLY 1
Arul
Super User
Super User

@sabry_303 ,

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!




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.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

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