Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi, I've been trying to find a solution to this for quite a while but haven't succeeded, so I'm trying here 🙂
I'm new to the Power BI world, so sorry if it's an easy fix. But I'm getting an error message when I try to convert my date table to date format. It's in PowerQuery and I'm getting the data directly from an SQL server. How can I make it recognize that it's a date?
Error message:
DataSource.Error: Microsoft SQL: Adding a value to a 'datetime2' column caused an overflow.
Details:
DataSourceKind=SQL
DataSourcePath='server name'
Message=Adding a value to a 'datetime2' column caused an overflow.
ErrorCode=-2146232060
Number=517
Class=16
Solved! Go to Solution.
Hi @AntonH -Go to the query editor in Power BI (Power Query).
Look at the column that holds the date values and see if there are any invalid dates eg: 0000-00-00, or dates far in the future or past that could cause this issue.
Replace or Filter Out Invalid Dates:In Power Query, you can use the Replace Values function to replace invalid date values with null or a valid placeholder date.
Alternatively, you can filter out rows where the date is invalid using the Filter Rows option.
Replace values that may cause overflow errors (like 0000-00-00) with a more manageable default date, example: 2000-01-01
check the column header of date and data type choose date/datetime data type
Hope this prevent the overflow errors.
Proud to be a Super User! | |
Hi @AntonH -Go to the query editor in Power BI (Power Query).
Look at the column that holds the date values and see if there are any invalid dates eg: 0000-00-00, or dates far in the future or past that could cause this issue.
Replace or Filter Out Invalid Dates:In Power Query, you can use the Replace Values function to replace invalid date values with null or a valid placeholder date.
Alternatively, you can filter out rows where the date is invalid using the Filter Rows option.
Replace values that may cause overflow errors (like 0000-00-00) with a more manageable default date, example: 2000-01-01
check the column header of date and data type choose date/datetime data type
Hope this prevent the overflow errors.
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
73 | |
57 | |
38 | |
35 |
User | Count |
---|---|
83 | |
68 | |
59 | |
46 | |
45 |