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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RobertReeves
Frequent Visitor

Create a time frame column from a datetime column

I have a table that has start and end times for calls. I need to create a column that has a time frame that the call took place in.  Is this possible in Power BI desktop? Below example has it split by hour, can it also be done by quarter hour?

Example:

 

StartTimeTime Frame
01/04/22 10:28 AM10:00:00 AM
01/11/22 11:24 AM11:00:00 AM
01/04/22 2:18 PM2:00:00 PM
01/05/22 10:46 AM10:00:00 AM
01/07/22 7:09 PM7:00:00 PM
02/15/22 2:10 PM2:00:00 PM
01/07/22 11:18 AM11:00:00 AM
01/11/22 2:45 PM2:00:00 PM
01/18/22 6:48 PM6:00:00 PM
03/21/22 2:43 PM2:00:00 PM
01/26/22 12:12 PM12:00:00 PM
02/03/22 10:12 AM10:00:00 AM
01/27/22 12:03 PM12:00:00 PM
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @RobertReeves ,

 

I think you can try this code to create a calculated column.

Time Frame = TIME(HOUR('Table'[StartTime]),00,00)

Change the data type to Time. Result is as below.

RicoZhou_0-1671698126240.png

 

Best Regards,
Rico Zhou

 

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
RobertReeves
Frequent Visitor

Thank you. That worked. I appreciate the assistance.

v-rzhou-msft
Community Support
Community Support

Hi @RobertReeves ,

 

I think you can try this code to create a calculated column.

Time Frame = TIME(HOUR('Table'[StartTime]),00,00)

Change the data type to Time. Result is as below.

RicoZhou_0-1671698126240.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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