Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Can anybody tell me how to extract just Hour from a Time column in Direct query mode? Thanks ahead
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...
May I ask what data source you are using?
warehouse data of the company
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 though
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.
2. import a table with a time column.
3. Go to query editor. Extract Hour from test_time column.
4. Apply and close query editor. Show data with table visual.
Best Regards
Alex
Thank you, Excellent soluytion I did now a Table for time to connect different table source and is working excellent.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
84 | |
69 | |
68 | |
39 | |
37 |