Forum Discussion

arvindarvind24's avatar
3 years ago
Solved

Time calculation for attendance

Hi All, Need your help on Time calculation for attendance.

 

DateEmpCodeStart TimeEnd TimeWorked TimeIN TimeFull / Not Full DayIN_Time But Not Full Day
03-10-2022369809:11:3917:40:0908:28:30 In_timeNot Full DayNo
06-10-2022369809:22:5318:27:4709:04:54 In_timeFull DayYes
07-10-2022369809:18:1318:23:4409:05:31 In_timeFull DayYes
10-10-2022369809:25:3118:27:1709:01:46 In_timeFull DayYes
17-10-2022369809:18:0318:22:2909:04:26 In_timeFull DayYes
18-10-2022369811:08:1418:08:0306:59:49Not_In_TimeNot Full DayNo
12-10-2022424210:29:3119:32:2009:02:49 In_timeFull DayYes
13-10-2022424210:34:0219:33:5008:59:48Not_In_TimeNot Full DayNo
14-10-2022424210:32:5815:09:5104:36:53Not_In_TimeNot Full DayNo
17-10-2022424210:46:1020:34:4309:48:33Not_In_TimeFull DayNo
18-10-2022424210:29:4120:19:3609:49:55 In_timeFull DayYes
19-10-2022424210:27:0719:50:3209:23:25 In_timeFull DayYes
20-10-2022424211:05:5217:27:5806:22:06Not_In_TimeNot Full DayNo
21-10-2022424211:03:1120:52:2809:49:17Not_In_TimeFull DayNo

 

Details

IN TimeIf Start the is less the equal to 10:30 the In_time else Not_In_Time
Full / Not Full Dayif worked 9 hours is completed the its full day else Not Full Day
IN_Time But Not Full DayEmp is in tine but not completede full day

 

https://drive.google.com/file/d/14H5Y2lVx_OoKSTAgWhUPGSi1dRbMYjaz/view?usp=sharing 

 

@amitchauhan @bvanderwatt @ray_ux @tamerj1 @SpartaBI @v-chenyue-msft 

 

 

 

 

 

 

 

 

 

 

 

 

  • Hi arvindarvind24 ,

     

    try these 3 measures

     

    IN Time =
    SWITCH(TRUE(),
    HOUR([Start Time])< 10,"IN Time",
    "Not in Time"
    )
     
    Full / Not Full Day =
    SWITCH(TRUE(),
           HOUR([Worked Time])<9,"Not Full",
           "Full"
    )
     
    IN_Time But Not Full Day =
    SWITCH(TRUE(),
           [IN Time] = "IN Time" && [Full / Not Full Day] = "Full",
           "YES","NO"
    )
     
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Hi arvindarvind24 ,

     

    try these 3 measures

     

    IN Time =
    SWITCH(TRUE(),
    HOUR([Start Time])< 10,"IN Time",
    "Not in Time"
    )
     
    Full / Not Full Day =
    SWITCH(TRUE(),
           HOUR([Worked Time])<9,"Not Full",
           "Full"
    )
     
    IN_Time But Not Full Day =
    SWITCH(TRUE(),
           [IN Time] = "IN Time" && [Full / Not Full Day] = "Full",
           "YES","NO"
    )
     
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  • mangaus1111 Thank you for your replay and its working fine, But when we use the min in the  IN_Time its not working.

     

     

    IN Time =
    SWITCH(TRUE(),
    HOUR([Start Time])< 10:30,"IN Time",
    "Not in Time"
    )

     

    • mangaus1111's avatar
      mangaus1111
      Icon for Solution Sage rankSolution Sage

      Hi arvindarvind24 ,

       

      sorry I supposed it was < 10 , but if you need < 10:30, then you have to use this formula:

       

      In Time =
      SWITCH(TRUE(),
      [Start Time]<= 1.4375,"In Time",
      "Not in Time"
      )
      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.