Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I am trying to think of a function or conditional column that I am able to use for the following situation:
Employee works 2/16 at 11:00pm (CST) and clocks in at 11:01:29 PM equals late because he didn't clock in at the schedule time.
But, because employee works from 11pm-7am, the system reads that employee is schedule at 12am on 2/17 and therefore is late because the clock in shows 12:03:29 AM. It should be counting the 11:01:29 PM clock in as late and not the 12:03:10 AM.
See chart below:
| UserID | Date | Schedule | Login | Late |
| jrex38 | Monday, February 16,2019 | 2/16/2020 11:00:00 PM | 2/16/2020 11:01:29 PM | No |
| jrex38 | Monday, February 17,2019 | 2/17/2020 12:00:00 AM | 2/17/2020 12:03:10 AM | Yes |
Does anyone have any idea what I could to fix this?
Thank you in advance.
Solved! Go to Solution.
In my next book coming out this month, I have a recipe for time zone conversion. Here is a brief excerpt from DAX Cookbook by Packt coming out this month. See if it helps.
To prepare for this recipe, do the following:
| Time | Timezone |
| 1:00:00 PM | EST |
To implement this recipe, do the following:
TZ Convert =
VAR __DestTZ = "ACWST"
VAR __SourceTime = MAX('R09_Table'[Time])
VAR __SourceTZ = MAX('R09_Table'[Timezone])
VAR __SourceOffset =
LOOKUPVALUE(
'R09_Timezones'[DAX UTC Offset],
'R09_Timezones'[Abbr.],
__SourceTZ
)
VAR __DestOffset =
LOOKUPVALUE(
'R09_Timezones'[DAX UTC Offset],
'R09_Timezones'[Abbr.],
__DestTZ
)
VAR __UTCTime = __SourceTime + -1 * __SourceOffset
RETURN
IF(
ISBLANK(__SourceTime),
BLANK(),
__UTCTime + __DestOffset
)
In my next book coming out this month, I have a recipe for time zone conversion. Here is a brief excerpt from DAX Cookbook by Packt coming out this month. See if it helps.
To prepare for this recipe, do the following:
| Time | Timezone |
| 1:00:00 PM | EST |
To implement this recipe, do the following:
TZ Convert =
VAR __DestTZ = "ACWST"
VAR __SourceTime = MAX('R09_Table'[Time])
VAR __SourceTZ = MAX('R09_Table'[Timezone])
VAR __SourceOffset =
LOOKUPVALUE(
'R09_Timezones'[DAX UTC Offset],
'R09_Timezones'[Abbr.],
__SourceTZ
)
VAR __DestOffset =
LOOKUPVALUE(
'R09_Timezones'[DAX UTC Offset],
'R09_Timezones'[Abbr.],
__DestTZ
)
VAR __UTCTime = __SourceTime + -1 * __SourceOffset
RETURN
IF(
ISBLANK(__SourceTime),
BLANK(),
__UTCTime + __DestOffset
)
Apologies @Anonymous , it is out there now! 🙂
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 8 | |
| 7 | |
| 6 |