Scheduled Refresh Configuration
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks and see fewer ads — read each lesson on a single page with Pro
Mastering Scheduled Refresh in Power BI Workspaces
Introduction: Why Scheduled Refresh Matters
In the modern data-driven organization, the value of a report is directly tied to the timeliness of its data. A dashboard that displays yesterday’s sales figures when the business requires real-time insights is not merely useless; it can be actively misleading. Scheduled refresh is the mechanism within the Power BI Service that ensures your datasets remain synchronized with your underlying data sources without requiring manual intervention. By automating the data retrieval process, you ensure that stakeholders always view the most accurate and current information available.
When you publish a Power BI Desktop file (a .pbix file) to a workspace, you are essentially uploading a data model. However, the data stored inside that file is a snapshot taken at the moment you last saved or refreshed it on your local machine. If your data source is a SQL database, an Azure Blob storage, or a SharePoint list, that data will change constantly. Scheduled refresh bridges the gap between your static report and your dynamic data sources, turning a static file into a living, breathing business intelligence tool.
Understanding how to configure, monitor, and troubleshoot scheduled refresh is a fundamental skill for any Power BI administrator or data analyst. This lesson will guide you through the technical requirements, the step-by-step configuration process, the role of the On-premises Data Gateway, and the best practices for maintaining a performant and reliable data pipeline.
The Mechanics of Data Refresh
To understand scheduled refresh, we must first distinguish between the two primary ways Power BI interacts with data: Import mode and DirectQuery. Scheduled refresh is specifically relevant to the Import mode, where data is physically copied into the Power BI service's memory.
Import Mode vs. DirectQuery
In Import mode, Power BI pulls the data from the source, compresses it, and stores it in the service. When a user opens a report, the visuals are generated from this cached data. Because the data is stored in the service, you must tell Power BI when to go back to the source to get the latest updates. This is the "Scheduled Refresh" process.
In contrast, DirectQuery does not store the data in the Power BI service. Instead, it sends a query to the underlying data source every time a user interacts with a visual. While this provides "real-time" data, it places a heavy load on your source database and can lead to slower report performance. Most organizations rely on Import mode for the majority of their reporting, making scheduled refresh the backbone of their operations.
Callout: Understanding Data Refresh Types It is important to distinguish between "Scheduled Refresh" and "Automatic Page Refresh." Scheduled refresh updates the entire dataset at the service level, typically occurring several times a day. Automatic Page Refresh is a feature that forces a visual to query the data source every few seconds or minutes to show live updates, which is only supported for DirectQuery or live connection models.
Prerequisites for Scheduled Refresh
Before you can set up a schedule, you must ensure that your environment is properly prepared. If any of the following components are missing or misconfigured, your refreshes will fail, often with cryptic error messages.
1. Data Source Connectivity
Power BI must be able to reach your data source. If the source is in the cloud (such as Azure SQL Database or a web API), Power BI can generally reach it directly. However, if your data source resides behind your company firewall (such as an on-premises SQL Server or a local Excel file), you must install and configure an On-premises Data Gateway.
2. Credentials
You must provide Power BI with credentials that have permission to access the data source. These credentials are encrypted and stored within the Power BI Service. It is highly recommended to use a service account (an account not tied to a specific individual's identity) to prevent scheduled refreshes from breaking when an employee leaves the company or changes their password.
3. Licensing
Scheduled refresh is a feature that requires a Pro or Premium Per User (PPU) license, or the workspace must be hosted in a Premium capacity. If you are using the free version of Power BI, you will not have access to the scheduled refresh settings in the workspace.
Step-by-Step: Configuring Scheduled Refresh
Once you have published your report to a workspace, follow these steps to enable the refresh schedule:
Step 1: Navigate to the Dataset Settings
Open your Power BI workspace in the web browser. Locate your dataset (the icon that looks like three bars). Click the "More options" (three dots) icon next to the dataset name and select "Settings."
Step 2: Configure Gateway Connections
If your data is on-premises, you will see a section for "Gateway connection." You must map your data source to a gateway that you have previously installed. If the gateway is not configured, you will see a red indicator telling you that the connection is offline or missing. Ensure that the source path in the gateway settings matches exactly the path used in your Power BI Desktop file.
Step 3: Configure Data Source Credentials
In the "Data source credentials" section, click "Edit credentials." You will be prompted to choose an authentication method (e.g., OAuth2, Basic, Windows, or Anonymous). Select the appropriate method and provide the credentials. If you are using Windows authentication, ensure the username includes the domain (e.g., DOMAIN\username).
Step 4: Enable Scheduled Refresh
Expand the "Scheduled refresh" section. Toggle the "Keep your data up to date" switch to "On." You will then be able to set the frequency (Daily or Weekly) and add specific time slots. Depending on your licensing (Pro vs. Premium), you may be limited in how many refreshes you can schedule per day.
Tip: Time Zone Awareness Remember that the time slots you select are based on the time zone of the Power BI region where your tenant is located. If your business operations are in a different time zone, adjust your refresh times accordingly to ensure the data is updated before your morning meetings.
The Role of the On-premises Data Gateway
The On-premises Data Gateway acts as a secure bridge between your internal network and the Power BI cloud service. Without it, the cloud-based Power BI service would be unable to traverse your firewall to reach your internal servers.
Types of Gateways
- Standard Mode: This is the multi-user gateway designed for enterprise environments. It allows multiple users to share a single gateway to connect to various data sources.
- Personal Mode: This is intended for individual use. It allows only the person who installed it to use it for their own reports. It does not support all the features of the standard mode and is generally discouraged for production environments.
Managing the Gateway
When you install the gateway, you should always keep it updated to the latest version. Microsoft releases updates monthly. An outdated gateway can lead to compatibility issues with newer Power BI features. Furthermore, ensure the machine hosting the gateway has sufficient memory and CPU resources, as it will be handling the data transit for all your reports.
Best Practices for Performance
A common mistake is creating massive datasets that take hours to refresh. If your refresh takes too long, it may time out, or it may interfere with other processes. Here are the industry standards for maintaining a healthy refresh cycle:
1. Optimize Your Data Model
Before publishing, ensure your data model is as lean as possible. Remove unused columns, filter out rows that aren't needed for analysis at the source level, and use star schemas rather than snowflake schemas. The smaller the model, the faster the refresh.
2. Incremental Refresh
For large datasets, do not refresh the entire model every time. Implement Incremental Refresh. This feature allows you to define a range of data (e.g., the last 30 days) that is refreshed, while historical data remains untouched. This significantly reduces the load on your data source and the time it takes for the refresh to complete.
3. Stagger Your Refresh Times
If you have dozens of reports, do not schedule them all to refresh at 8:00 AM. This will create a bottleneck in your gateway or your data source. Spread your refresh times throughout the day to ensure a smooth flow of data processing.
4. Monitor Refresh Failures
Power BI sends an email notification to the dataset owner when a refresh fails. Always ensure that the "Send refresh failure notification emails" option is enabled in the settings. Additionally, consider using the Power BI Admin Portal to monitor refresh history across your entire organization to identify patterns of failure.
Common Pitfalls and Troubleshooting
"Invalid Credentials" Error
This is the most common error. It usually occurs when a password has been updated in the database but not in the Power BI Service. If you change a password for a service account, you must remember to update it in the Power BI Service settings immediately.
Gateway Connectivity Issues
If the gateway appears offline, check the service on the host machine. Sometimes the Windows service for the gateway stops unexpectedly. Ensure the machine is configured to reboot automatically or that the service is set to "Automatic" startup.
Timeouts
If your data source is slow, the Power BI service may time out before the data retrieval is finished. If this happens, you may need to optimize the SQL queries you are using in your "Power Query" (M code) or consider moving the data to a more performant staging area, like an Azure SQL Database, before pulling it into Power BI.
Warning: Data Privacy Levels A frequently overlooked issue is "Data Privacy Levels." If you combine data from multiple sources (e.g., a SQL database and a CSV file), Power BI may block the query execution to prevent data leakage. You must set the privacy levels for all sources to the same level (e.g., "Organizational" or "Public") to allow the mashup engine to combine them successfully.
Advanced Refresh Configurations: The M Language
While most refresh configurations are handled through the UI, advanced users can manipulate the underlying M code to optimize data retrieval. For instance, you can use parameters to control which data is pulled.
// Example: Using a parameter for dynamic filtering
let
Source = Sql.Database("ServerName", "DatabaseName"),
FilterDate = DateTime.Date(DateTime.LocalNow()) - #duration(30, 0, 0, 0),
Table = Source{[Schema="dbo", Item="Sales"]}[Data],
FilteredRows = Table.SelectRows(Table, each [TransactionDate] >= FilterDate)
in
FilteredRows
In this example, the M code dynamically calculates the date 30 days ago and filters the source data accordingly. When the scheduled refresh runs, it will only pull the last 30 days of data, keeping the model lightweight and fast.
Comparison Table: Refresh Options
| Feature | Scheduled Refresh | Automatic Page Refresh |
|---|---|---|
| Purpose | Update entire dataset | Update visuals on page |
| Data Mode | Import | DirectQuery / Live Connect |
| Frequency | Hourly / Daily | Seconds / Minutes |
| Source Load | Low (Batch) | High (Continuous) |
| Licensing | Pro/Premium | Premium/PPU (for low intervals) |
Maintenance and Monitoring
Managing scheduled refresh is not a "set it and forget it" task. As your data grows, your refresh times will increase. You should periodically review the refresh history in the "Settings" menu to see how long each refresh takes and whether there is a trend of increasing duration.
If you find that refreshes are taking consistently longer, it is time to revisit your data model. Check for "query folding" issues. Query folding is the ability of Power Query to push the transformation logic back to the source database. If you use transformations that cannot be folded (like certain custom functions or complex joins), Power BI will pull the entire table into memory and process it locally, which is extremely inefficient.
Always keep your data sources clean. If you have tables that are no longer used in any report, delete them from the model. Every table adds overhead to the refresh process. By maintaining a clean, optimized model, you ensure that your scheduled refreshes remain fast, reliable, and invisible to the end users.
Frequently Asked Questions
Can I trigger a refresh manually?
Yes. At any time, you can click the "Refresh now" button next to your dataset in the workspace. This is useful when you have just updated the data source and need the report to reflect the changes immediately without waiting for the next scheduled slot.
What happens if a refresh fails?
If a scheduled refresh fails, the data in the report will not be updated. The report will continue to show the last successfully refreshed data. Power BI will attempt the refresh again at the next scheduled time, but if the underlying issue (like a password change or server outage) is not fixed, it will continue to fail.
How many times can I refresh per day?
With a Pro license, you can schedule up to 8 refreshes per day. If you have a Premium capacity, you can schedule up to 48 refreshes per day. These limits are designed to prevent the service from being overwhelmed by constant requests.
Can I refresh different tables at different times?
Not directly within a single dataset. A refresh operation affects the entire dataset. If you need different refresh frequencies for different parts of your data, you should split them into separate datasets or use a composite model approach where some tables are imported and others use DirectQuery.
Key Takeaways
- Scheduled Refresh is Mandatory for Import Mode: It is the only way to keep your reports current when using imported data. Without it, your data remains a static snapshot.
- Gateway Configuration is Critical: For on-premises data, the gateway is the most common point of failure. Ensure it is installed, updated, and that credentials are correctly mapped.
- Service Accounts Prevent Downtime: Always use a dedicated service account with limited, appropriate permissions to manage your data source connections. This avoids issues caused by individual user account changes.
- Optimize for Performance: Use Incremental Refresh for large datasets and ensure your transformations support query folding to keep refresh times low and reliable.
- Monitor Regularly: Check your refresh history logs and set up failure notifications so you can proactively resolve issues before users report missing or stale data.
- Understand Licensing Limits: Be aware of the refresh frequency limits associated with your specific Power BI license (Pro vs. Premium) to plan your reporting strategy effectively.
- Data Privacy Matters: Always set consistent privacy levels for your data sources to avoid errors during the data mashup process, which is a common but easily avoidable pitfall.
By following these principles, you will ensure that your Power BI workspaces remain robust, performant, and, most importantly, provide your organization with the accurate, timely data they need to make informed decisions. Managing scheduled refresh is a cornerstone of professional Power BI administration, and mastering it will significantly improve the reliability of your data infrastructure.
Continue the course
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons