Forum Discussion
Simple Workday/OffHours custom column
- Anonymous1 year ago
Hi SarahHope, lbendlin, thank you for your prompt reply!
We can use the Hour function to return the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.):
Create a calcualted column as shown below:
DayNight = IF( HOUR('Table'[TimeCreated]) >= 8 && HOUR('Table'[TimeCreated]) < 17, "Workday", "Off Hours" )Reference link:
HOUR function (DAX) - DAX | Microsoft Learn
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SarahHope, lbendlin, thank you for your prompt reply!
We can use the Hour function to return the hour as a number from 0 (12:00 A.M.) to 23 (11:00 P.M.):
Create a calcualted column as shown below:
DayNight =
IF(
HOUR('Table'[TimeCreated]) >= 8 && HOUR('Table'[TimeCreated]) < 17,
"Workday",
"Off Hours"
)
Reference link:
HOUR function (DAX) - DAX | Microsoft Learn
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much Joyce! I was super busy this week and didn't get back to this until today. This is very helpful.