Forum Discussion

eliassal's avatar
eliassal
Helper II
6 years ago
Solved

Date/Time Issue between SQL and Power BI Desktop

Hi, I have a select statement that runs fine in SSMS it returns 1st column as date as follows   SELECT CAST(timestamp AS DATE) AS daily, Datepart(Year, Timestamp) as Year, Datepart(Month, Timest...
  • v-yingjl's avatar
    v-yingjl
    6 years ago

    Hi eliassal ,

    Becasue date type in sql server is corresponded with date/time type in power bi desktop.

    If you want to use horizontal bar chart to show the date without time, I think you should contact the owner of this custom visual because this custom visual shows time automatically and we could not change it settings.

    One temporary way to use this visual to show date without time is to change the data type in cast() function from date to varchar:

     

    Or you can use default bar charts in power bi such as Stacked bar chart, change the format of daily field and change the type of Y-axis as Categorical:

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.