Forum Discussion
StartOfDay question
Hi ! I tried to use StartOfDay function in new column (I have datetime values but I need day report - and diferrent records has different hours and minutes. I work with Azure database and use DirectQuery - because the results are going to dashboard). I got an error that this transformation can't be used for live connection.
Menawhile I created columns with Year, Month, Day in EditQuery, then created a date from 3 of those and it is working but it's strange to use 4 columns instead of one.
Any ideas ?
By the way in another report I use StartOfWeek and it is working with live connection.
Thank you very much !
4 Replies
- Greg_DecklerCommunity Champion
In Power Query "M", you should be able to use Date.From() with a datetime value fed in and it should return the date.
https://msdn.microsoft.com/en-us/library/mt260687.aspx
- NataliyaDNew Member
Thank you
!
It worked.
But I created a new weekly query and now Date.StartOfWeek is not "good" for live stream also (while I do have on report on dashboard where it works - have no idea what is the difference)
Any suggestion how can I create date unique for the week ? (preferably start of the week but any unique date will be ok)
Thank you !
- Greg_DecklerCommunity Champion
Apologies, I'm not understanding what you are asking for. A unique date for the week?