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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
wasaprinters
Frequent Visitor

Calculate Late Arrival Time of Employee

PowerBi Problem.jpg

 

Respected All,

 

With referene of screenshot of my Colomns, Our Company Time is 10 AM is Checkin and 7 Pm is Check Out, While Colums [dali_time] is a actual time of Employee arrival and leave.. First of All i want to seperate the time from 1 colums to 2 colums i.e. Time in Actual and Time out Actual then after i want a new colums which show Late arrival of Employee or Leave early employee with another column late mintues or hours calculation of employee 

 

Thanks in Advance 

4 REPLIES 4
fahadqadir3
Super User
Super User

@wasaprinters  First you need to apply PIVOT functionality on "dali_time" and "Check in out" column to get the 2 separate columns for check in and check out time. Please review the attached following screenshots;

fahadqadir3_2-1721374238414.png

 

Now you have 2 separate columns, now write a calculated Column in DAX to find out Late or on time:

fahadqadir3_3-1721374947635.png

CheckoutStatus = 
VAR CheckOutTime = 'Table'[Check out]
VAR TimeOut = [Time Out]
RETURN
IF(
CheckOutTime = TimeOut,
"On time",
IF(
CheckOutTime < TimeOut,
"Early",
"Late"
)
)

@wasaprinters  Hope it works.

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!! 

 

PowerBi Problem 2.jpg

 

Sir,

 

Now it bacame like this,, but i want as you have shared the screenshot in two colums check in and check out 

 

@wasaprinters Please share your previous step screenshot. You just need to select 2 Columns.

1st column with IN Out e.g: Check IN and Check Out

2nd Column: Time

PowerBi Problem 4.jpgPowerBi Problem 3.jpg

 

Its Generating error Expression.Error: We cannot convert the value null to type Text.
Details:
Value=
Type=[Type]

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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