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
Vinxsta
Frequent Visitor

DATEVALUE function recognising date as mmddyyyy instead of ddmmyyyy

I've looked through this forum and haven't found a response that solves this issue. 

I have a table from ssms that comes into Power BI as a date (ddmmyyyy) and my locale is also set to UK however, in a DAX query I've written I have to add a date to be used as a filter however, the correct outcome is only achieved by writing the date in a mmddyyyy format instead of ddmmyyyy. How can this be resolved as I'm unsure how i resolve this and I don't want to have to use the US format for my dates. Thanks!!

3 REPLIES 3
Vinxsta
Frequent Visitor

The issue is that date column I'm using is already formatted as ddmmyyyy so i don't need to do anything with that column. The issue arises when i use datevalue

The issue you're encountering is likely due to how DAX handles date literals, which are interpreted in the US date format (mm/dd/yyyy) by default, even if your data and locale are set to UK (dd/mm/yyyy).

aduguid
Super User
Super User

You could convert the column to a date in power query by adding a custom column. 

 

Date.FromText(Text.Middle([YourColumnName], 4, 4) & "-" & Text.Middle([YourColumnName], 2, 2) & "-" & Text.Start([YourColumnName], 2))

 

Or in DAX

 

DATE(
    MID([YourColumnName], 4, 4),   // Year
    MID([YourColumnName], 2, 2),   // Month
    MID([YourColumnName], 1, 2)    // Day
)

 

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.