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.
When I create a new .pbix file with Power BI Desktop and create a new blank query with M expression:
let
Source = {
try #datetime(1, 1, 0, 23, 59, 59.999999),
#datetime(1, 1, 1, 0, 0, 0),
#datetime(99, 12, 31, 23, 59, 59.9999999),
#datetime(100, 1, 1, 0, 0, 0),
#datetime(9999, 12, 31, 23, 59, 59.9999999),
try #datetime(10000, 1, 1, 0, 0, 0)
},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type datetime}})
in
#"Changed Type"
I get the result I expect within the Power Query UI:
However when I load the table to model:
2 datetime values that were fine in Power Query are now blank. I suspect that all datetimes prior to 0100-01-01 00:00:00 are no longer considered valid datetimes while Power Query documentation states that these should be valid.
https://docs.microsoft.com/en-us/powerquery-m/sharpdatetime
In Power BI Desktop these invalid dates are handled silently but in the Power BI Service/AAS they cause datasets to no longer be refreshable without adding error-handling.
Would it be possible to again allow datetimes between 0001-01-01 00:00:00 and 9999-12-31 23:59:59?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update from PG team:
All the behavior described here is by design: the only date within our supported range in the 9999 one and it's propagating to the model correctly. The ask here seems to be a feature request to expand the range of valid dates to minimize the chance of errors when doing refresh in the service.
Best Regards,
Community Support Team _ Yingjie Li