Forum Discussion

rajasekar_o's avatar
rajasekar_o
Icon for Helper V rankHelper V
2 years ago

login logout time calculate

Hi team ,

i have Login logout data, need to calculate IN TIME and OUT TIME 
IN TIME  min of login time 
in time must  between 9:30.00 am to 8:30:00 pm 

out time
if the employee have logout time on that date the take max of logout time ,if ther is no logout time on that date the check nexday before 9:30:00am take that time is logout time other wise is empty 

 

 how to calculate intime and out time expected output

  i try but not come correctly

 

 

 

11 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi rajasekar_o ,

     

    I made many attempts, you can check the pbix file.

     

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

    • rajasekar_o's avatar
      rajasekar_o
      Icon for Helper V rankHelper V

      its working only one employee if employee added is not working 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi rajasekar_o ,

         

        Just include the name as one of the conditions.Try the following expression:

        IN = var _t = ADDCOLUMNS('Table',"AM",MINX(FILTER(ALL('Table'),IF([Measure]<=14.5,[Name]=EARLIER([Name])&&[datetime.1]=EARLIER([datetime.1])&&[type ]="IN",[Name]=EARLIER([Name])&&[datetime.1] -1=EARLIER([datetime.1])&&[type ]="IN")),[datetime.2]))
        RETURN MINX(_t,[AM])
        
        OUT = var _t = ADDCOLUMNS('Table',"AM",MAXX(FILTER(ALL('Table'),IF([Measure]<=14.5,[Name]=EARLIER([Name])&&[datetime.1]=EARLIER([datetime.1])&&[type ]="OUT",[Name]=EARLIER([Name])&&[datetime.1] -1=EARLIER([datetime.1])&&[type ]="OUT")),[datetime.2]))
        RETURN MAXX(_t,[AM])

         

        Hope it helps!

         

        Best regards,
        Community Support Team_ Scott Chang

         

        If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi team ,

    i have Login logout data, need to calculate IN TIME and OUT TIME 
    IN TIME  min of login time 
    in time must  between 9:30.00 am to 8:30:00 pm 

    out time
    if the employee have logout time on that date the take max of logout time ,if ther is no logout time on that date the check nexday before 9:30:00am take that time is logout time other wise is empty 

     

     

    i need out put intime and out time  i try but not come correctly , how to calculate intime and out time

     

     

     

  • HI TEAM , i have employee login  data  and name of employee data 
    need to calculate in time and out time , i try more time but its not working 

    i

    "I want to calculate the 'in time' and 'out time' for employees.
    The 'in time' should be the maximum 'intime' recorded between 9:30 am and 2:00 pm on a given date. If there is no 'in time' recorded, it should be blank.

    For 'out time', if an employee has recorded an 'out time' on a specific date, it should be the maximum 'out time' for that date. If there is no 'out time' recorded, check the next day. If an 'out time' is recorded before 6:00 am on the next day, use that as the 'out time'; otherwise, 'out time' should be blank."
    i give the expected output