Forum Discussion
Help with excluding after work hours from a date range
- 7 years ago
Hi Rosenmeyer ,
Based on my test, you could refer to below formulas:
Work hour filter = IF(HOUR('Table1'[TICKET_CREATED])>=8&&HOUR('Table1'[TICKET_FINISHED])<=16,1,0)Above formula could filter the work hour:
Week Days = WEEKDAY('Table1'[TICKET_CREATED])WEEKDAY function could return a number from 1 to 7 identifying the day of the week of a date:
https://docs.microsoft.com/en-us/dax/weekday-function-dax
If you problem could not be solved, could you please offer your desired result if possible?
Also you could download the pbix file to have a view.
Regards,
Daniel He
Hi Rosenmeyer ,
Based on my test, you could refer to below formulas:
Work hour filter = IF(HOUR('Table1'[TICKET_CREATED])>=8&&HOUR('Table1'[TICKET_FINISHED])<=16,1,0)
Above formula could filter the work hour:
Week Days = WEEKDAY('Table1'[TICKET_CREATED])
WEEKDAY function could return a number from 1 to 7 identifying the day of the week of a date:
https://docs.microsoft.com/en-us/dax/weekday-function-dax
If you problem could not be solved, could you please offer your desired result if possible?
Also you could download the pbix file to have a view.
Regards,
Daniel He