Forum Discussion
Null Values Date Data Type
- 4 years ago
Hi Xaraja
Power BI can accept null or blank values in a date data type column. In Power Query Editor, it displays null. In Power BI Desktop, it displays blank. In below image, it shows the same table in two places.
What is the error message do you see? If the report is working, perhaps the cause is not the null values in date columns. Can you please show the error message after removing sensitive info?
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
I went on vacation last week, and today, looking at the dataset in Power Query and looking at the error to try to update this thread, I realized there was a very simple error in the formula. There was a column name that wasn't right and so it was not the null values that were erroring out, but the ones that had a date that were throwing errors. The formula looked like this: = Table.AddColumn(#"Added Custom", "Shipped Date", each if [trans_type] = "SH" then [Transaction Date] else if [trans_type] = "SO" then [Transaction Date] else null). The column name was supposed to be [trans_date]. I fixed this and the errors went away.
Sorry to waste your time with such a simple problem! Clearly I needed that vacation badly. I'm glad to know I can have null values in a date column though.
Hi Xaraja
Glad to hear that you have fixed the error. You can accept an appropriate reply as Solution to help close this thread. Thanks.
Best regards,
Jing