Forum Discussion
Date column which contains null value in Azure SQL MI encountered error
All the date columns in the dataset encountered following error when displaying in Power BI Service/Desktop. Only date columns which contain null value in it and the database is Azure SQL MI.
Error Message:
The conversion of a date data type to a datetime data type resulted in an out-of-range value.. The exception was raised by the IDataReader interface. Please review the error message and provider documentation for further information and corrective action.
The connection of power BI to the Azure SQL MI database is Direct Query. Hence I cant set the date column with Replace Error option in POwer Query Editor. I have tried to use following workaround to set the date to blank() or a dummy date when it is null but the same error still returning.
IF(ISBLANK('DIM-Agent'[A_APPT_DATE])=True,DATE(2999,12,31),'DIM-Agent'[A_APPT_DATE])
Could anyone assist ?
1 Reply
- freginierSolution Sage
3 options :
- import your data and transform data
- or use DirectQuery SQL statement from Power BI to transform data (replace / cast / etc),
- or create a view with your SQL transformations