Forum Discussion
Anonymous
4 years agoNot applicable
Creating Shifts based on Date and Time
Hi All: I am trying to filter some performance data based on date and time. Here are the shift examples: Example is based on 03/21/2022 9pm - 03/22/2022 5pm working day. "AM Dispatch Wave...
- Anonymous4 years ago
Hi Anonymous ,
You can update the formula of your calculated column [SHIFT] as below:
SHIFT = VAR test = TIME ( HOUR ( 'OperatorTTP'[SESSION_START_TIME_LOCAL] ), MINUTE ( 'OperatorTTP'[SESSION_START_TIME_LOCAL] ), SECOND ( 'OperatorTTP'[SESSION_START_TIME_LOCAL] ) ) RETURN IF ( test >= TIME ( 7, 0, 0 ) && test < TIME ( 15, 0, 0 ), "PM Dispatch Wave", IF ( ( test >= TIME ( 0, 0, 0 ) && test < TIME ( 6, 0, 0 ) || test >= TIME ( 21, 0, 0 ) && test < TIME ( 23, 59, 59 ) ), "AM Dispatch Wave", "What is this?" ) )Best Regards
amitchandak
Super User
4 years agoAnonymous , Based on what I got
A new column
Switch( True() ,
timevalue([SESSION_START_TIME_LOCAL]) >= (21,0,0) || timevalue([SESSION_START_TIME_LOCAL]) < (6,0,0), "AM Dispatch Wave" , PM Dispatch Wave)