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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
WasayAli
Regular Visitor

How to Show hours in Power Bi?

Hi,

I have a power bi report that is connected to data sources using a direct query. I have a time column (format hh:mm). I want to know how can I extract and aggregate hours in a way that the slicer only shows hours for selection as shown in the picture below.

WasayAli_1-1690978176999.png

 

Also, using this slicer, the visual should is also updated.

 

WasayAli_2-1690978210854.png

 

In summary, I want only hours and not minutes (like 1:00, 2:00 ... 24:00), because the user should be able to filter only one day's data.

1 ACCEPTED SOLUTION
foodd
Super User
Super User

Using Power Query, add a Column using the following, and refer to that column as the value in the slicer:

 

= Table.AddColumn(#"Changed Type", "Hour", each Time.Hour([Period]), Int64.Type)

 

foodd_2-1690987025840.png

 

foodd_0-1690986791616.png

foodd_1-1690986914590.png

 

View solution in original post

2 REPLIES 2
WasayAli
Regular Visitor

It works. Thanks

foodd
Super User
Super User

Using Power Query, add a Column using the following, and refer to that column as the value in the slicer:

 

= Table.AddColumn(#"Changed Type", "Hour", each Time.Hour([Period]), Int64.Type)

 

foodd_2-1690987025840.png

 

foodd_0-1690986791616.png

foodd_1-1690986914590.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors