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.
In the Query Editor, if you select a date or datetimezone type column and choose Add Column - Date - Day - Start of Day or End of Day, the result gets an incompatible data type datetime, instead of date or datetimezone.
To make things worse: the results are still visible in the Query Editor, but the data won't load to the data model. (See also issue: http://community.powerbi.com/t5/Issues/Table-AddColumn-and-Table-DuplicateColumn-may-display-invalid...).
Example of created code (Start of Day for a date column):
= Table.AddColumn(SampleData, "StartOfDay", each Date.StartOfDay([Date1]), type datetime)
The cause of the issue is with the data type datetime that is supplied as parameter columnType with Table.AddColumn, while the actual data is date or datetimezone.
Likewise: for other "Start of..." and "End of..". options (Year, Month, Quarter, Week) on the Add Column menu, the generated code differs according to the datatype of the selected column.
My suggestion is to do the same with Start of Day and End of Day.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.