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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
pedroccamaraDBI
Post Partisan
Post Partisan

pivot or transpose?

Hello everyone
I have this table on the left and I want to have the table on the right

transpose.JPG

Can you please help me on how to do this? 
Thanks in advance

1 ACCEPTED SOLUTION

sure. follow the image.

 

1. open power query

3. select any column except CLOCK_DATETIME (make sure it is date time type)

2. transform > pivot >>pivot on CLOCK_DATETIME 

expand advanced option. select do not aggregate. 

 

do not aggregate will keep your value same, whereas aggregating value will for example count will only count different dates. In this case value will be 1. as you have one date only. you can open power query and play around with the agg functions to better understand. Let me know if you need to solution file. 

and voila!

 

rubayatyasmin_0-1689698502535.png

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

7 REPLIES 7
rubayatyasmin
Community Champion
Community Champion

Hi, @pedroccamaraDBI 

 

pivot on clock date time. this works. 

 

rubayatyasmin_0-1689696380330.png

 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Thank you for your answer @rubayatyasmin but can you be more specific? It's not working

 

this is what I got 

 

= Table.Pivot(Table.TransformColumnTypes(dbo_PCC_ClockInOut, {{"CLOCK_TYPE", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(dbo_PCC_ClockInOut, {{"CLOCK_TYPE", type text}}, "en-GB")[CLOCK_TYPE]), "CLOCK_TYPE", "CLOCK_DATETIME", List.Count)

sure. follow the image.

 

1. open power query

3. select any column except CLOCK_DATETIME (make sure it is date time type)

2. transform > pivot >>pivot on CLOCK_DATETIME 

expand advanced option. select do not aggregate. 

 

do not aggregate will keep your value same, whereas aggregating value will for example count will only count different dates. In this case value will be 1. as you have one date only. you can open power query and play around with the agg functions to better understand. Let me know if you need to solution file. 

and voila!

 

rubayatyasmin_0-1689698502535.png

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Thank you so much @rubayatyasmin 

Happy to help. @pedroccamaraDBI 

 

 

Appreciate the kudos. 👍


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Select your clock type column > Transform > Pivot Column > Make sure your value column is your datetime and the aggregation is set to "Don't Aggregate"
Syk_0-1689697962769.png

 

Thank you for your answer @Syk 

Just to understand, is there any difference between "with no aggregation" and selecting MAX or MIN instead?

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.