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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vtomsons
Helper I
Helper I

Date Change from DD-MM-YYYY

I have one data source giving me trouble because it is DD-MM-YYYY formatted. When I change the data from text to date, Power BI is not consistent with numbers in the day or month column below 12. I need to have the month data accurate so I can define a Fiscal year starting in May using the syntax below.

 

Can anyone help ensure my date can transfer the month data accurately?

 

Fiscal Year = IF(MONTH('NC Reg''n'[Current Registration Status Date])>4,YEAR('NC Reg''n'[Current Registration Status Date])+1,YEAR('NC Reg''n'[Current Registration Status Date]))

 

Thanks,

 

Val

1 ACCEPTED SOLUTION

Thank you very much. My data is a little messed up right now after trying a few ways. I'll try your suggestion and let you know how it goes in the next few days.

 

Thanks so much for your time and advice.

 

Val

View solution in original post

6 REPLIES 6
VasTg
Memorable Member
Memorable Member

@Vtomsons 

 

Try changing the date to MM/dd/yyyy format if you could.

 

In Query Editor,Right Click in the column -  Change Type-Using Locale - Select the Type (Date Time) and Select the Locale.

 

If this helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn

Thanks but it didn't change anything. 

 

Should I use some sort of Table? I really don't care for the exact day but I do want the month and year to be accurate.

 

Any other suggestions?

 

Val

@Vtomsons 

 

Did you choose datatype as Date and United Kingdom(English). They follow dd/mm/yyyy format.

After that you could use Month or Year Dax function.

Cap11.PNG

Cap11.PNG

 

After that it will behave as regular date.

 

 

If this helps mark it as a solution

Kudos are nice too

Connect on LinkedIn

Thank you very much. My data is a little messed up right now after trying a few ways. I'll try your suggestion and let you know how it goes in the next few days.

 

Thanks so much for your time and advice.

 

Val

Looks like the 2nd solution worked. I was not linking to UK English like you suggested. 

 

Thanks a ton.

 

Val

Try create a column like 

new date =

mid(DD__MM__YY[Date],4,2) &"/"& left(DD__MM__YY[Date],2) & "/" & right(DD__MM__YY[Date],4)
 
join it with date table
 
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi

https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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