Forum Discussion

eklaseid9's avatar
eklaseid9
New Member
7 years ago
Solved

time between day

Hi, 

i want to find the total number of accident happand in am and total number of accident happand in pm.

 and if it is possable i ant to divide the day into three time pireod how i can do that 

 

 

 

im new to these concept

Thank you

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi eklaseid9,

    You can add a calculated column with if statement to check time part from datetime value, then group records based on time range.

    Time period =
    VAR _time =
        TIMEVALUE ( [Datetime] )
    RETURN
        IF (
            _time > TIME ( 16, 0, 0 ),
            "P3",
            IF ( _time > TIME ( 8, 0, 0 ), "P2", "P1" )
        )
    

    Regards,
    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi eklaseid9,

    You can add a calculated column with if statement to check time part from datetime value, then group records based on time range.

    Time period =
    VAR _time =
        TIMEVALUE ( [Datetime] )
    RETURN
        IF (
            _time > TIME ( 16, 0, 0 ),
            "P3",
            IF ( _time > TIME ( 8, 0, 0 ), "P2", "P1" )
        )
    

    Regards,
    Xiaoxin Sheng