Forum Discussion
Monthname to date
- 6 years ago
Hello @yukipilas ,
I try to replay the scenario by connecting it to the SQL Server database in DirectQuery mode.
I don't think we can transform the data type in this scenario.
Therefore, it is suggested to add a new column in the database.
For the SQL Server database, try the following:
USE YourDatabase ALTER TABLE YourTableName ADD Date_ AS CAST(CONCAT(Year_ , '/' , Month_ , '/' ,1) as date)Best regards
Icey
If this post helps,then consider Accepting it as the solution to help other members find it more quickly.
Hi all, i tried the solution in the power Query but my power BY crashes:
therefore i used the first suggestion from @lkalawski.
However here the disadvantage is that is that i have to switch my table to Import moment and cannot use Direct Query,
you have any ideas ?
Hello @yukipilas ,
I try to replay the scenario by connecting it to the SQL Server database in DirectQuery mode.
I don't think we can transform the data type in this scenario.
Therefore, it is suggested to add a new column in the database.
For the SQL Server database, try the following:
USE YourDatabase
ALTER TABLE YourTableName ADD Date_ AS CAST(CONCAT(Year_ , '/' , Month_ , '/' ,1) as date)
Best regards
Icey
If this post helps,then consider Accepting it as the solution to help other members find it more quickly.