Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PowerVisualBI
Helper I
Helper I

Calculating time between check in and check out in one day

 

Hi all.
I have a problem, how to calculate check in and check out times that are done multiple times in one day?
I just need an early checkin and late checkout time of the day.
So it applies if he checks in before 08:00 AM, then he is on time, and if he checks out after 05:00 PM, then he is on time too every user

In Out.jpg

1 ACCEPTED SOLUTION
Dhacd
Resolver III
Resolver III

Hi @PowerVisualBI ,

Try the below dax to create a new table,

CALCULATETABLE (
    SUMMARIZE (
        TableName,
        'TableName'[Tgl]
        "In",Min('TableName'[In]),
        "Out",Max('TableName'[Out]),

    )
)

  And use the below dax as a calculated column

If(and([in]<=Time(08,00,00),out>=time(17,00,00)),"On Time", "Not On time")

 

If there is any issue please copy and paste a sample table from excel. And mention the issue so that I can Create a file that I can share with you.

Thanks and regards, 
Atma.

View solution in original post

5 REPLIES 5
Dhacd
Resolver III
Resolver III

Hi, Sorry for the late reply,
Try the file attached in the below link.

link 

Dhacd
Resolver III
Resolver III

Hi @PowerVisualBI ,

Try the below dax to create a new table,

CALCULATETABLE (
    SUMMARIZE (
        TableName,
        'TableName'[Tgl]
        "In",Min('TableName'[In]),
        "Out",Max('TableName'[Out]),

    )
)

  And use the below dax as a calculated column

If(and([in]<=Time(08,00,00),out>=time(17,00,00)),"On Time", "Not On time")

 

If there is any issue please copy and paste a sample table from excel. And mention the issue so that I can Create a file that I can share with you.

Thanks and regards, 
Atma.

Thank you @Dhacd 
I've found a way based on your solution.

Hello @Dhacd 
What about the user? because if I use the DAX formula above, I can only see the earliest check-in and the last checkout. I want to see it by user. Because users can check in and check out many times a day. But I just want to count this check, he's the earliest and his checkout is the last

Hi @Dhacd 
I've tried the DAX you provided, but I haven't found a solution yet. You can check my file below
https://drive.google.com/drive/folders/1plQwa5E0C2k7n21-cZUO2EoUnONRMXpd?usp=sharing

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.