cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
abpgupta
Post Patron
Post Patron

Capture Execution time for Power Query object

Hi All

 

Is there any way to capture execution time between Power Query steps starting from source till end of last step?

 

Thanks for inputs!

2 REPLIES 2
Sahir_Maharaj
Super User
Super User

Hello @abpgupta,

 

In the Advanced Editor, you will see the M code that defines your query. Insert the following code at the beginning of the query:

let
    StartTime = DateTime.LocalNow(),
    Source = [Your Source],
    ...[Your Query Steps]...
    EndTime = DateTime.LocalNow(),
    ExecutionTime = EndTime - StartTime
in
    ExecutionTime

 

This will capture the start time, end time and execution time of your query in the format of DateTime. 

 

Let me know if you might need further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
P.S. Want me to build your Power BI solution?
Data Scientist | Data Engineer | Data Analyst | AI Engineer

➤ Website: https://sahirmaharaj.com

➤ Email: sahir@sahirmaharaj.com

➤ Lets connect on LinkedIn: Join my network of 12K+ professionals

➤ Want me to build your Power BI solution? Lets chat about how I can assist!

➤ Join my Medium community of 30k readers! Sharing my knowledge about data science and artificial intelligence


LinkedIn Top Voice in Artificial Intelligece, Data Science and Machine Learning

I had done this but both times came same. I am looking for time to fetch data.  Thank you!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors