Diagnose Power Query In Excel

Anshul Marele 0 Reputation points
2025-11-29T03:56:23.8633333+00:00

Hi,

Is there any inbuilt or script to have detailed Excel Power Query Performance report with:

  1. Time taking by each query
  2. Num of Cols
  3. Num of Rows
  4. Number of Dependent Queries
  5. Num of steps in each query
  6. Any step taking huge time to perform
  7. Any other suggestion to optimize query performance
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-29T03:56:35.03+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Power Query in Excel does not have a built-in feature that directly generates a detailed performance report with all the specific metrics you've mentioned. However, you can utilize the following approaches to diagnose and optimize Power Query performance:

    1. Query Diagnostics: Power Query provides query diagnostics that can help you analyze performance. You can access diagnostics to see how long each step takes, which can help identify any steps that are taking a significant amount of time. This information can be found in the Query Diagnostics section of Power Query.
    2. Performance Counters: You can also run performance counters that give insights into resource utilization during query execution, including processor time and memory usage. This information can help you understand how your queries are impacting system resources.
    3. Best Practices: Following best practices can help optimize query performance. For example, performing expensive operations last, working against a subset of your data, and ensuring that you are leveraging query folding where possible can significantly improve performance.
    4. Manual Analysis: While there isn't an automated script to provide all the metrics you listed, you can manually check the number of columns, rows, dependent queries, and steps in each query through the Power Query editor.
    5. Optimization Suggestions: If you notice any steps taking a long time, consider revising those steps. For instance, if a sort operation is taking too long, try filtering data first to reduce the dataset size before sorting.

    By combining these approaches, you can gather insights into your Power Query performance and identify areas for optimization.

    0 comments No comments

  2. Phoebe-N 7,110 Reputation points Microsoft External Staff Moderator
    2025-11-29T12:56:54.84+00:00

    Hi @Anshul Marele

    Welcome to Q&A Community! 

    Thank you for sharing your concerns about Power Query performance in Excel. Excel Power Query includes helpful tools to diagnose and improve performance: 

    • Query Diagnostics 

    In the Power Query Editor, you can use Start Diagnostics and Stop Diagnostics to generate detailed reports showing execution time per query and per step. This helps identify which steps take the longest and where improvements can be made. 

    • Query Dependencies 

    The Query Dependencies view provides a visual map of how queries relate to each other, which is useful for spotting queries with multiple dependents that may slow down refreshes. 

     

    If you need a more detailed report, such as counting steps or dependencies, a VBA macro can help. However, we want to be transparent: creating a fully customized performance dashboard often requires advanced scripting and community-driven solutions. 

    For this reason, we sincerely recommend posting your question on Stack Overflow where many Power Query experts actively share scripts, best practices, and troubleshooting advice.  

    Please note: The external resource mentioned is recommended for reference purposes only. These platforms contain contributions from independent users and community experts. Please review and validate any advice, scripts, or solutions you find there before implementing them in your environment to ensure they meet your organization’s security, compliance, and performance requirements. 

    Thank you again for reaching out. We truly value your time and commitment to improving your data processes, and we are here to support you in any way we can. 


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.