Forum Discussion
Anonymous
6 years agoNot applicable
Classification between times
Hello, i'm having trouble making a column that returns T1 T2 or T3 depending on wich time it was made From 00:00 to 5:59 T3 6:00 to 13:59 T1 14:00 to 21:59 T2 22:00 ...
- 6 years ago
Hi Anonymous ,
Try this code to create a calculated column:
Column =VAR _time = TIME(HOUR('Table (2)'[Column1]);MINUTE('Table (2)'[Column1]); SECOND('Table (2)'[Column1]))RETURN IF(_time >= TIME(0;0;0) && _time <= TIME(5;59;0); "T3";IF(_time >= TIME(6;0;0) && _time <= TIME(13;59;0); "T1";IF(_time >= TIME(14;0;0) && _time <= TIME(21;59;0); "T2";IF(_time >= TIME(22;0;0) && _time <= TIME(23;59;0); "T3"))))Ricardo
camargos88
Community Champion
6 years agoHi Anonymous ,
Try this code to create a calculated column:
Column =
VAR _time = TIME(HOUR('Table (2)'[Column1]);MINUTE('Table (2)'[Column1]); SECOND('Table (2)'[Column1]))
RETURN IF(_time >= TIME(0;0;0) && _time <= TIME(5;59;0); "T3";
IF(_time >= TIME(6;0;0) && _time <= TIME(13;59;0); "T1";
IF(_time >= TIME(14;0;0) && _time <= TIME(21;59;0); "T2";
IF(_time >= TIME(22;0;0) && _time <= TIME(23;59;0); "T3"))))
Ricardo
- Anonymous6 years agoNot applicable
It worked ! Thanks a lot Ricardo, God Speed