How to Increase Timeout in Power BI

Cody Schneider8 min read

Hitting a timeout error in Power BI is a common roadblock that can abruptly halt your data analysis and refresh processes. When you're trying to pull in a large dataset or run a complex query, that frustrating "timeout expired" message can stop you dead in your tracks. This guide will walk you through exactly how to increase timeout limits in Power BI Desktop, the on-premises Gateway, and offer strategies for handling the fixed limits within the Power BI Service.

GraphedGraphed

AI Data Analyst for Growth Teams

Get the insights your sales and marketing teams need to grow your business faster.

  • Unify your data in one place in 15 minutes
  • Conversational analytics, live dashboards, charts & reports
  • Connect our MCP to Claude or ChatGPT
Graphed Dashboard Preview

Understanding Why Power BI Timeouts Occur

A "timeout" is essentially a built-in safety mechanism. It's a predefined time limit for how long Power BI will wait for a data source to respond to a query or for a process to complete. Without timeouts, a faulty or extremely long-running query could lock up your system resources indefinitely.

You can encounter timeouts in several different places:

  • Power BI Desktop: This often happens in the Power Query Editor while you're connecting to a data source and trying to transform data. The default command timeout is usually 10 minutes.
  • On-Premises Data Gateway: When refreshing a dataset that relies on an on-premises data source (like a local SQL Server), the gateway itself has timeout settings that might be stricter than your data source's.
  • Power BI Service: When you schedule a refresh for a published dataset, the Power BI Service imposes its own, often non-negotiable, timeout limit based on your license type (e.g., 2 hours for Pro, 5 hours for Premium).

The solution depends entirely on where you're experiencing the timeout. Let's break down how to fix it in each scenario.

How to Increase Timeout in Power BI Desktop

If your queries are timing out while you're building a report in Power BI Desktop, you have a couple of options to extend the waiting period.

GraphedGraphed

AI Data Analyst for Growth Teams

Get the insights your sales and marketing teams need to grow your business faster.

  • Unify your data in one place in 15 minutes
  • Conversational analytics, live dashboards, charts & reports
  • Connect our MCP to Claude or ChatGPT
Graphed Dashboard Preview

1. Change Timeout on a Specific Data Source Connection

This is the most targeted approach. You can set the timeout for an individual query directly in the Power Query Editor. This is especially useful if you only have one or two long-running queries and don't want to change the global settings.

Here's how to do it, using a SQL Server connection as an example:

  1. In Power BI Desktop, go to the Home tab and click on Transform data to open the Power Query Editor.
  2. In the Queries pane on the left, find the query that is timing out.
  3. Select the query, then in the Applied Steps pane on the right, click the gear icon next to the Source step. This opens the connection details dialog box.
  4. Expand the Advanced options section.
  5. You will see a "Command timeout in minutes" box. You can enter a new, higher value here. For example, you could increase it from the default of 10 to 30 or 60 minutes.
  6. Leave this box blank to use the source's default timeout, or enter 0 to have it wait indefinitely (use with caution!).
  7. Click OK to save your changes.
  8. Click Close & Apply in the Power Query Editor to test your query again.

Behind the scenes, this action modifies the M code for your source step. You can see this by clicking on the Advanced Editor. The code will include a CommandTimeout parameter:

Source = Sql.Database(
    "your_server_name", 
    "your_database_name", 
    [Query="SELECT * FROM very_large_table", CommandTimeout=#duration(0, 1, 30, 0)]
)

Here, #duration(0, 1, 30, 0) represents a duration of 0 days, 1 hour, 30 minutes, and 0 seconds.

2. Manually Edit the M Code

For some data sources, the "Command timeout" option isn't available in the user interface. In these cases, you can often add the timeout argument manually in the Advanced Editor.

  1. Select your query in the Power Query Editor.
  2. Click on Advanced Editor in the Home tab.
  3. Locate your source connection function (e.g., Odbc.DataSource, Sql.Database).
  4. Add the CommandTimeout option to the record of options. For example:
// Before
Source = Odbc.DataSource("dsn=MyOracleDB", [HierarchicalNavigation=true])

// After (with a 45-minute timeout)
Source = Odbc.DataSource("dsn=MyOracleDB", [HierarchicalNavigation=true, CommandTimeout=#duration(0, 0, 45, 0)])

Check the Power Query documentation for your specific connector to see if the CommandTimeout option is supported.

Extending Timeout Limits for the On-Premises Data Gateway

If your reports are published and you're using a scheduled refresh with an on-premises data source, the gateway can be the source of your timeout errors. You'll need to modify a configuration file on the server where the gateway is installed.

Warning: Be careful when editing configuration files. It's always a good idea to make a backup before making any changes.

  1. Log in to the server where your On-Premises Data Gateway is installed.
  2. Stop the gateway service. You can do this by searching for "Services" in the Windows Start menu, finding the "On-premises data gateway service" in the list, right-clicking it, and selecting "Stop."
  3. Navigate to the gateway's installation folder. The default location is typically C:\Program Files\On-premises data gateway.
  4. Find and open the configuration file named Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config as an administrator. Right-click the file and choose "Open with" > Notepad (or a better text editor like Notepad++), but make sure you have administrator privileges to save the changes.
  5. Inside the <appSettings> section, add a key for MashupDefaultCommandTimeout. If the appSettings section doesn't exist, add it within the <configuration> section. The value is set in milliseconds (e.g., 3,600,000 for 1 hour).
<configuration>
  <appSettings>
    <add key="MashupDefaultCommandTimeout" value="3600000" />
  </appSettings>
</configuration>
  1. Save the modified config file.
  2. Restart the gateway service. Go back to the Services window, right-click the "On-premises data gateway service," and select "Start."

This change increases the command timeout for all data sources using this gateway, giving your queries more time to complete during a scheduled refresh.

GraphedGraphed

AI Data Analyst for Growth Teams

Get the insights your sales and marketing teams need to grow your business faster.

  • Unify your data in one place in 15 minutes
  • Conversational analytics, live dashboards, charts & reports
  • Connect our MCP to Claude or ChatGPT
Graphed Dashboard Preview

Working Around Timeouts in the Power BI Service

Unlike Power BI Desktop and the Gateway, the refresh timeouts in the Power BI Service are hard limits set by Microsoft. You cannot file a ticket or change a setting to increase them.

  • Power BI Pro: 2 hours per dataset.
  • Power BI Premium Per User (PPU): 5 hours per dataset.
  • Power BI Premium Capacity: 5 hours per dataset (can be longer for XMLA-based refreshes).

When you're facing a service-level timeout, throwing more time at the problem isn't an option. The solution is to make your refresh process faster and more efficient.

Best Practices to Avoid Service Timeouts:

1. Optimize Your Data Model

The leaner your data model, the faster it will refresh.

  • Remove Unused Columns: Go through your tables in the Power Query Editor and remove any columns you don't need for reports or calculations. Every extra column adds to the refresh time and memory usage.
  • Disable Auto Date/Time: In Power BI Desktop, go to File > Options and settings > Options > Data Load and uncheck "Auto Date/Time." This stops Power BI from creating hidden date hierarchy tables for every date field, which can bloat your model.
  • Optimize DAX Calculations: Inefficient DAX can slow down not only visual rendering but also certain parts of the refresh process, especially if you have complex calculated tables or columns.

2. Efficiently Transform Your Data with Query Folding

Query folding is the secret weapon of efficient Power Query transformations. It's the process where Power Query translates your transformation steps (like filtering, sorting, and grouping) into the native language of the source system (like SQL). This means the data source does all the heavy lifting before sending a smaller, cleaner result back to Power BI.

A simple action like filtering dates or categories at the very beginning of your applied steps can reduce the data being downloaded from billions of rows to just a few thousand, dramatically speeding up your refresh.

3. Use Incremental Refresh

If you're dealing with very large datasets that continue to grow over time, incremental refresh is the ultimate solution. Instead of re-importing the entire dataset every time, incremental refresh partitions your data (usually by date) and only refreshes the most recent period you define (e.g., the last 7 days).

This means your daily refresh might take 5 minutes instead of 3 hours, easily staying below the timeout limits. Setting this up requires a Premium license (per user or capacity) and some initial configuration in Power BI Desktop, but it’s the standard practice for managing enterprise-scale datasets.

GraphedGraphed

AI Data Analyst for Growth Teams

Get the insights your sales and marketing teams need to grow your business faster.

  • Unify your data in one place in 15 minutes
  • Conversational analytics, live dashboards, charts & reports
  • Connect our MCP to Claude or ChatGPT
Graphed Dashboard Preview

Final Thoughts

Managing timeouts in Power BI is a matter of knowing where to look. For developers, extending the timeout in Power BI Desktop or a data gateway can solve immediate issues, but true, long-term stability comes from optimizing your queries and data model to make them faster and more efficient, particularly for refreshes in the Power BI Service.

At Graphed, we noticed that a lot of the frustration around analytics comes from exactly these kinds of issues - wrestling with configurations, optimizing slow queries, and waiting for manual refreshes. We built our platform to eliminate that friction completely. By connecting your data sources like Google Analytics, Shopify, and Salesforce in a few clicks, you can use simple, natural language to get dashboards and answers in real-time. This lets you focus on the insights from your data, not on the technical hurdles of getting it.

Related Articles

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.