Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
NataliyaD
New Member

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 4
Greg_Deckler
Super User
Super User

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

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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 !

Apologies, I'm not understanding what you are asking for. A unique date for the week?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Sorry 😞

 

I have a datetime value in my records and I wanted to create weekly report.

StartOfWeek function looked promising, but for some reason it worked for one of my live reports and not accepted anymore for others (may be after last update of power bi)

 

It doesn't have to be start of the week - just some way to count records by week.

 

Thank you very much !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.