Forum Discussion
DateFormat Error in Power BI using Sharepoint connection
Hi msft-cap
One of the columns defined as Date/Time likely contains values with inconsistent or invalid formatting, which causes Power BI to throw a [DataFormat.Error] when trying to parse them.
This usually happens when:
-
The column includes values with leading/trailing spaces (e.g.,
" 01/02/2024"). -
The date format in the source file differs from the expected format in Power BI (e.g., U.S.
MM/DD/YYYYvs. U.K.DD/MM/YYYY). -
Some values are not valid dates at all.
You have two options to resolve this:
-
Fix the source file – If possible, open the SharePoint file and clean up the problematic column by removing extra spaces and making sure the date format is consistent.
-
Handle it in Power BI – In Power Query:
-
Use
Text.Trim()before converting the column to date. -
Use Using Locale when converting to date to match the original date format (e.g., English (United States) or English (United Kingdom)).
-
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly