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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bourne2000
Helper V
Helper V

How to format the data in Power query?

Hi

 

I have the below table

 

bourne2000_0-1632480812707.png

 

I would like to format the above table as below

 

bourne2000_2-1632481046157.png

 

 

Basically counting how many times 12 PM or 9 am presents respective to the date. I would like to do the above in Power query as a seperate table. Here is the sample PBIX https://we.tl/t-BHfxKLrJQL

 

Please advise

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @bourne2000 ;

You could use pivot in power query like belows  :

1.Copy the Tour date column.

vyalanwumsft_1-1632721494598.png

2.Pivot the copy column.

vyalanwumsft_3-1632721593499.png

The final output is shown below:

vyalanwumsft_4-1632721632641.png

In addition ,it also can be achieved by matrix.

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @bourne2000 ;

You could use pivot in power query like belows  :

1.Copy the Tour date column.

vyalanwumsft_1-1632721494598.png

2.Pivot the copy column.

vyalanwumsft_3-1632721593499.png

The final output is shown below:

vyalanwumsft_4-1632721632641.png

In addition ,it also can be achieved by matrix.

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@bourne2000 , Pivot in power query can do that

https://radacad.com/pivot-and-unpivot-with-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors