Forum Discussion
Date/Time Issue between SQL and Power BI Desktop
- 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 LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
eliassal , how you have done these transformations.
There are quite a few stuff is not supported as a custom column in Direct query
Check-in dax as a calculated column.
Format example you can take from
It is a straight forward simple select
SELECT
CAST(timestamp AS DATE) AS daily,
Datepart(Year, Timestamp) as Year,
Datepart(Month, Timestamp)-1 as Month,
Datepart(Day, Timestamp) as Day,
COUNT(ipaddress) AS ipperday
FROM mytable
WHERE timestamp< GETDATE()
GROUP BY
CAST(timestamp AS DATE),
Datepart(Year, Timestamp),
Datepart(Month, Timestamp)-1,
Datepart(Day, Timestamp)
ORDER BY daily ASC