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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Libin7025
Frequent Visitor

Dynamic DAX for UTC to EDT (Daylight time) conversion.

Dynamic EDT&EST = VAR OriginalDateTime = src_system_info[loaded_at]
VAR CurrentYear = YEAR(TODAY())

// Calculate the second Sunday of March for the current year

VAR MarchFirst = DATE(CurrentYear, 3, 1)
VAR Weekdayofmarchfirst = WEEKDAY(MarchFirst)

VAR MarchSecondSunday =

SWITCH(
    true(),
    Weekdayofmarchfirst = 1, MarchFirst + (7 - Weekdayofmarchfirst) + 1,
    Weekdayofmarchfirst > 1, MarchFirst + (14 - Weekdayofmarchfirst) + 1
)

//Calculate the first sunday of November for current year
VAR NovemberFirst = Date(CurrentYear, 11, 1)
VAR NovemberFirstSunday = NovemberFirst + (7 - WEEKDAY(NovemberFirst)) + 1  

VAR EDTStart = MarchSecondSunday // Second Sunday of March
VAR ESTStart = NovemberFirstSunday // First Sunday of November

VAR AdjustedDateTime =
    SWITCH(
        TRUE(),
        OriginalDateTime >= EDTStart && OriginalDateTime < ESTStart,
        OriginalDateTime - TIME(4, 0, 0),  // Eastern Daylight Time (EDT) UTC offset is -4 hours

        OriginalDateTime >= ESTStart && OriginalDateTime < EDTStart + 365, // Transition occurs within a year
        OriginalDateTime - TIME(5, 0, 0),  // Eastern Standard Time (EST) UTC offset is -5 hours

        TRUE(),
        BLANK()
    )

RETURN
    FORMAT(AdjustedDateTime, "DD MMM YYYY") & " at " & FORMAT(AdjustedDateTime, "hh:mm:ss AM/PM") & IF(HOUR(AdjustedDateTime) = 0, " ET", " EDT")
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Libin7025 Is this a question or a post on a helpful DAX calculation? If the latter, you might consider posting it to the Quick Measures Gallery. Quick Measures Gallery - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Libin7025 Is this a question or a post on a helpful DAX calculation? If the latter, you might consider posting it to the Quick Measures Gallery. Quick Measures Gallery - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

It's a helpful DAX calculation. Thanks for directing me to the right path to post this. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.