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
Anonymous
Not applicable

Cannot change data type to date

NAV System one table have two date column: shipment date and posting date , I can change shipment date to date type, cannot change posting date to date type, I need date hierarchy for posting date, why same table, posting date column cannot change data type to date? Is anyone have same issue ? Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Please post some sample data for us to assist.  The answer to you question will be hidden in the data you are working with.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Please post some sample data for us to assist.  The answer to you question will be hidden in the data you are working with.

Mine changes half the data type to date, whilst the other half of the rows display the word "error" where the "date" should have been displayed. The Power Query Editor in Power BI Desktop seems to have a bug!

 

The same data source does work fine in Office 2016 Professional Plus - when using the Power Query Editor. Power Pivot features work well in Excel. It is possible that the Power BI Desktop / Power Query Editor - might have an issue. 

Anonymous
Not applicable

Ok, lets start with some basics then.  How is your date stored in your source dataset?  Are they stored as strings, or as numbers in the 'Days since 31/12/1899' format?

 

Check for a pattern on what dates were changed fine and what dates failed.  For example, did dates where the "Day" component was 12 or less convert correctly, but dates after the 13th fail?  If so, your dates are being classified as the opposite format to what you are expecting (i.e. DD/MM/YYYY vs MM/DD/YYYY).

 

Are all if your dates just dates, or as some of them DateTimes?

 

One option is to format your dates as in the source, or part of the transformation YYYY-MM-DD.

Anonymous
Not applicable

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.