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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
TomBrown
Frequent Visitor

how to crate a calculated column based on time between hours (08:00-18:00)

hello 

im trying to crate a column that has a value of "working hours" or "out of the office hours" 

and this would be by the value of a [opend time] , if the time in the opend time column is btween 8:00-18:00 then i wolud like to set the value of the new column to "working hours"

and if it not in those hours then it should say not working hours.

iv tried using an if statment and im getting an error 

 

Expression.Error: The name 'IF' wasn't recognized. Make sure it's spelled correctly. 

3 REPLIES 3
parry2k
Super User
Super User

@TomBrown share table with sample data and what expression you used to add the column. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

NumberOpenedDomainGroupAssigned toStateSubstateCustomer PriorityFirst Response TimeResolvedClosedChannelInternal Priority
CS00541542020-03-30 08:39:59SmartHD - Help DeskRacheli MamanCancelled 3 - Low2020-03-30 08:46:09 2020-03-30 09:10:44Phone3 – Low
CS00541502020-03-30 08:30:56SmartHD - Help DeskTzlil Ben-NaehResolved 3 - Low2020-03-30 08:38:322020-03-30 10:47:50 Phone3 – Low

what i did is split the opend to 2 columns opend date & opend time 

and as i explained i would like to creat a new column baset on the opend time value.

 

Thanks 

 

Hi @TomBrown 

 

Not quite understand your requirements, could you please kindly elaborate more? it would be appreciated if you could create the desired results with data.

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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