Forum Discussion
SQL Server DQ Date data type
- Anonymous9 years ago
Hi Anonymous,
When I write T-SQL statements to get data from SQL Server, I can reproduce your issue.
In this case, you can directly change the data type of the date column in Report View, please click the Date column in the Fields panel of the following screenshot, then you can click on Modeling in the Desktop ribbon and change its type to Date.
Also you can change the date format to your desired format.
Thanks,
Lydia Zhang
Hi Anonymous,
Firstly, I am not able to reproduce your issue that date data type is represented as DateTime in Power BI when connecting SQL Server 2014 Standard edition via Direct Query option, please check the following screenshots. Power BI Desktop doesn’t change the Date data type to DateTime. Please make sure that your columns are defined as Date data type in SQL Server.
Secondly, when we use Advanced filtering to filter a Date type field in Power BI Desktop, it still shows the time portion in visual level filter, from my point of view, this behavior is by design. I have reported this issue internally and will post back once I get any updates.
Thanks,
Lydia Zhang
Hi Anonymous,
Thanks for responding. This is definitely one of those "works on my machine" type thing. See the screenshot below.
And the screen shot of PowerBI desktop here. Notice how it chagned it to DateTime:
Since this is a DirectQuery it won't let appy & save any transformation or datatype chagnes.
- Anonymous9 years agoNot applicable
Hi Anonymous,
When I write T-SQL statements to get data from SQL Server, I can reproduce your issue.
In this case, you can directly change the data type of the date column in Report View, please click the Date column in the Fields panel of the following screenshot, then you can click on Modeling in the Desktop ribbon and change its type to Date.
Also you can change the date format to your desired format.
Thanks,
Lydia Zhang