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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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