Forum Discussion
jhaldane
8 years agoFrequent Visitor
Group Days and create shifts
Please can you assist me (step by step) Please can you show me how to group into days and then create three shifts. i.e. I have many rows for the 1st May all with different times. Then group times ...
- 8 years ago
Hi jhaldane,
Month = Test_3[Dates].[MonthNo] Day = Test_3[Dates].[Day] Time = FORMAT(Test_3[Dates] ,"hh:mm:ss") Shift = IF ( Test_3[Time] >= TIME ( 6, 0, 0 ) && Test_3[Time] < TIME ( 14, 0, 0 ), "Shift1", IF ( Test_3[Time] >= TIME ( 14, 0, 0 ) && Test_3[Time] < TIME ( 22, 0, 0 ), "Shift2", "Shift3" ) )Best regards,
Yuliana Gu
v-yulgu-msft
Microsoft Employee
8 years agoHi jhaldane,
Month = Test_3[Dates].[MonthNo]
Day = Test_3[Dates].[Day]
Time = FORMAT(Test_3[Dates] ,"hh:mm:ss")
Shift =
IF (
Test_3[Time] >= TIME ( 6, 0, 0 )
&& Test_3[Time] < TIME ( 14, 0, 0 ),
"Shift1",
IF (
Test_3[Time] >= TIME ( 14, 0, 0 )
&& Test_3[Time] < TIME ( 22, 0, 0 ),
"Shift2",
"Shift3"
)
)
Best regards,
Yuliana Gu
ncav36
7 years agoNew Member
Hi, this did not work for me as I continue to get an error that states operations do not support comparing values of type Text with values of type Date. It says to consider using the Value or Format function to convert. But then when I convert the Time column as you have suggested, it also gives me an error that says "Cannot covert value " of type Text to type Date". Please help, I've done exactly what you've suggested and I cannot get it to work.