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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sunjin122
Helper I
Helper I

how to extract Hour from a Time format in Direct Query Mode?

Can anybody tell me how to  extract just Hour from a Time column in Direct query mode? Thanks aheadSmiley Happy

8 REPLIES 8
arify
Microsoft Employee
Microsoft Employee

Can you try to do it in the query editor first, and then load it to the designer?

This cannot be done in Query Editor since this is live data by using DirectQuery mode instead of Import data...

arify
Microsoft Employee
Microsoft Employee

May I ask what data source you are using?

warehouse data of the company

arify
Microsoft Employee
Microsoft Employee

When you go through Recent Sources button it may not ask for Direct Query, but can you try going through Get Data > ... and pick DirectQuery in there?

 

Or, when you load it into PBI Designer, you can right click > Edit, doesn't that work?

It is not working under Direct Query mode. Thank you for your help thoughSmiley Happy

Hi,

 

You can extract Hour from a Time Column in Direct query mode. But you can’t change its data type.

See my screenshots below.

 

1.  connect database with direct query mode.

 

 

1.png

 

2.  import a table with a time column.

 

 

2.png

 

3. Go to query editor. Extract Hour from test_time column.

 

 

3.png

 

4.png

 

4. Apply and close query editor. Show data with table visual.

 

5.png

 

Best Regards

Alex

 

 

Thank you, Excellent soluytion I did now a Table for time to connect different table source and is working excellent.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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