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
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
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.