Excelgoodies logo +65 3106 5185

LEARN THIS HANDS ON

Power BI Reporting

. Live Online FILLING FAST
View all upcoming batches
Power BI Training Singapore: Why Your Dataset Refresh Works in Desktop but Fails After Publishing

Power BI Training Singapore: Why Your Dataset Refresh Works in Desktop but Fails After Publishing

You hit Refresh in Desktop, everything loads fine. You publish, schedule a refresh in the Power BI service, and the first email of the morning is a failure notification. Same dataset, same queries, different result.

This post walks through a realistic scenario and the handful of root causes that explain most “works in Desktop, fails in Service” refresh issues – and how to fix them properly instead of poking random settings.


The Scenario: HR Dashboard That Only Breaks After Publish

You’re supporting an internal HR analytics dashboard.

  • Data sources:
    • On-premises SQL Server (HR system)
    • A secured network file share with monthly Excel extracts
    • A SharePoint Online list used for comments
  • Model: Import mode dataset, published to a workspace in a shared capacity.

On your laptop, Refresh in Power BI Desktop succeeds.

After publishing:

  • Scheduled refresh fails with an email saying “Your data source can't be refreshed because the credentials are invalid” or a gateway-related error.
  • On-demand refresh in the Service sometimes fails with “Information is needed in order to combine data” or a timeout.

Let’s fix this systematically.


Step 1: Confirm the Failure Is Only in the Service

Before changing anything, prove the problem is environment-related.

  1. Open the same .pbix you published.
  2. In Power BI Desktop:
    • Check File > Options and settings > Data source settings.
    • Confirm all sources show Status: OK.
  3. Hit Refresh.

If Desktop refresh fails, you have a query/model problem, not a Service-only problem. Fix that first.

If Desktop refresh succeeds and Service fails, you’re dealing with one or more of:

  • Missing / misconfigured gateway
  • Credential type mismatch between Desktop and Service
  • Privacy level or data-combining behaviour differences
  • Cloud-only sources (e.g. SharePoint Online) with wrong auth in the Service
  • Service limits (timeout, size) vs your local machine

We’ll use the HR scenario to go through each.


Step 2: Fix On-Premises Sources via Gateway

In our scenario, the HR SQL Server and the network file share are on-premises. Power BI Service cannot reach them directly over your corporate network – it needs a gateway.

2.1 Check if a Gateway Is Actually in Use

In the Power BI Service:

  1. Go to Settings (gear icon) > Manage connections and gateways.
  2. Under Gateways, confirm:
    • At least one gateway is Online.
    • You have Use permission on it.

Then, for the published dataset:

  1. Go to the workspace.
  2. Click More options (… ) > Settings on your dataset.
  3. Under Gateway and cloud connections:
    • Look for On-premises data gateway.
    • Check if your dataset shows Not configured correctly.

If it’s not mapped, scheduled refresh will fail for any on-prem sources.

2.2 Map Dataset Sources to Gateway Data Sources

Each distinct connection string used in your Power Query must have a corresponding data source configured on the gateway.

For our HR example, we need:

  • A SQL Server data source (for the HR DB)
  • A File or Folder data source (for the network share path)

In Manage connections and gateways:

  1. Select the gateway cluster.
  2. Under Data sources, click + New.
  3. Create:
    • Type: SQL Server
      • Server: exactly as used in Desktop (e.g. HRDB-SQL01 or hrdb-sql01.domain.local)
      • Database: same name as in Desktop
      • Authentication method: typically Windows or Basic (SQL auth), matching how the server is configured
    • Type: File or Folder
      • Path: UNC path (e.g. \\fileserver01\HR_Reports)

Use a service account that:

  • Has read rights on the SQL DB and share.
  • Is a domain account if using Windows auth.

Back on the dataset settings page:

  1. Under Gateway and cloud connections, expand the gateway.
  2. Map each Data source listed to the corresponding gateway data source.

Only when the mapping is correct will the dataset refresh use the gateway.

2.3 Match Connection Details Exactly

If your Desktop uses localhost or a different server alias, the Service will not match it to the gateway entry. This is a common reason “Gateway is online but dataset still shows Not configured correctly”.

In Desktop, update the source definition to match the gateway connection string.

For example, in Power Query:

let
    Source = Sql.Database("HRDB-SQL01", "HR_Prod")
in
    Source

Publish again, then re-check the gateway mapping.


Step 3: Fix Credential Mismatches in the Service

In Desktop, Power Query uses your local credentials. In the Service, each data source stores its own credentials. They are independent.

For our HR scenario, the three sources use different auth types:

  • SQL Server (on-prem): Windows/Basic via gateway
  • File share: Windows via gateway
  • SharePoint Online list: Organizational account (cloud, no gateway needed)

3.1 Update Credentials for Each Source

In the dataset settings page:

  1. Scroll to Data source credentials.
  2. For each entry:
    • Click Edit credentials.
    • Choose the correct Authentication method.
    • Provide credentials that actually work for that source.

Key points:

  • SharePoint Online / OneDrive: Use OAuth2 with an organizational account.
  • SQL via gateway: Credentials are configured on the gateway data source, not here. But the dataset still needs to be mapped to that gateway source.
  • File share via gateway: Same; the Windows credentials live on the gateway data source.

If you see “Your data source can't be refreshed because the credentials are invalid”, it almost always means:

  • The stored credentials expired or were revoked.
  • The auth method changed (e.g. Basic vs OAuth2).
  • The gateway is using an account without access.

Fix the credentials, then run a manual refresh to confirm.


Step 4: Handle Privacy Levels and “Information Is Needed…” Errors

A refresh that works in Desktop but fails in the Service with:

Information is needed in order to combine data

usually points to privacy levels or query folding differences.

4.1 Understand the Difference Between Desktop and Service

In Desktop, you can disable privacy checks under File > Options and settings > Options > Global > Privacy. Many teams do this for performance.

In the Service, privacy levels are enforced per data source. You can’t globally turn them off; you can only set them to None, Public, Organizational, or Private.

If your queries combine data from sources with conflicting privacy levels, the Service may block the operation or require explicit configuration.

4.2 Set Privacy Levels Consistently

In the dataset settings page, under Data source credentials:

  1. For each data source, click Edit credentials.
  2. Set a Privacy level that reflects the data and allows combining.

For our HR scenario:

  • HR SQL DB: Organizational or Private (depending on policy)
  • File share: Organizational or Private
  • SharePoint Online list: Organizational

If all sources are within the same tenant and appropriately protected, setting them to Organizational is common, and usually avoids unnecessary blocking.

4.3 Avoid Unnecessary Cross-Source Joins When Possible

If you merge HR SQL data with SharePoint comments in Power Query, the engine may need to materialize one source locally. This can be slower or more fragile in the Service.

Where practical:

  • Do heavy joins within a single source (e.g. inside SQL) and expose a view.
  • Keep cross-source merges to smaller, dimension-like tables.

But don’t assume cross-source joins are unsupported – they are supported, just subject to privacy and folding behaviour.


Step 5: Fix SharePoint and Other Cloud Source Issues

In our scenario, the SharePoint Online list is cloud-based and doesn’t use the on-premises gateway.

Common Service-only failure causes:

  • Desktop uses cached credentials that include MFA; Service uses a stale token.
  • The URL used in Desktop doesn’t match what the Service expects.

5.1 Use the Correct SharePoint URL Pattern

In Desktop, when connecting to a SharePoint Online list or folder, use the site root URL, not the list or file URL.

For example:

let
    Source = SharePoint.Tables("https://contoso.sharepoint.com/sites/HR", [ApiVersion = 15])
in
    Source

Avoid embedding tenant-specific paths that might change (like file URLs with ?web=1 parameters).

After publishing, set the credentials in the Service using OAuth2 with an organizational account that has access to the site.

5.2 Re-authenticate When Accounts or Policies Change

If your organization enforces MFA or conditional access, tokens used by the Service may expire or be revoked when:

  • The user leaves the company.
  • The user’s MFA method changes.
  • Conditional access policies are updated.

Whenever that happens, you’ll see credential errors in the refresh history. The fix is simply to Edit credentials and sign in again with a valid account.

For production datasets, consider using a dedicated service account where your security policies allow it.


Step 6: Watch for Service Limits and Timeouts

Sometimes everything is configured correctly, but the Service still fails while Desktop succeeds, especially on large HR datasets.

6.1 Dataset Size and Memory

Desktop runs on your machine’s resources. The Service runs under capacity limits (shared or Premium).

If your dataset is close to the maximum size allowed for your capacity, refresh may fail in the Service even if Desktop copes.

To mitigate:

  • Remove unused columns and tables.
  • Filter out historical data you don’t need.
  • Pre-aggregate in the source (e.g. SQL views).

6.2 Query Performance Differences

Query folding to SQL may behave differently in the Service. For example, if a step in Power Query prevents folding, the Service may need to pull more data over the network than your local Desktop, and hit timeouts.

Typical fixes:

  • Keep folding as long as possible: do filtering, grouping, and joins early and in a way the connector can fold.
  • Avoid custom functions that iterate row by row over large tables.
  • Offload complex logic to SQL views or stored procedures where appropriate.

You can check folding in Desktop by right-clicking a step in Power Query and looking for View Native Query. If it’s greyed out early in the query, consider refactoring.


Step 7: Use Refresh History to Validate the Fix

After each change, don’t just assume it worked – confirm via refresh history.

In the Service:

  1. Go to the dataset.
  2. Click More options (… ) > Settings.
  3. Under Scheduled refresh, click Refresh history.

You’ll see:

  • Start and end times
  • Status (Completed / Failed)
  • For failures, a detailed error message and sometimes a link to more info

For our HR scenario, you might see a progression like:

  1. Initial failure: “You don't have any gateway or personal gateway installed…” → fix gateway.
  2. Next failure: “The credentials provided for the SQL source are invalid.” → fix gateway data source credentials.
  3. Next failure: “Information is needed in order to combine data” → align privacy levels.
  4. Final state: all scheduled refreshes show Completed.

Once you have a clean history for a few runs, you can treat the issue as resolved.


One Habit That Prevents Most Post-Publish Refresh Failures

Before you send any new dataset to production, do a Service-first validation:

  1. Publish to a non-production workspace.
  2. Configure gateway mappings and credentials.
  3. Run a manual refresh in the Service and check refresh history.
  4. Only then move the dataset or promote it to the workspace your users rely on.

That small step turns “mysterious Monday-morning failures” into predictable, fixable configuration tasks you catch before the HR team sees anything break.

Editor's Note

This article reflects the growing need for Power BI teams to treat Desktop and Service refresh as separate environments, especially in organisations mixing on-premises gateways with cloud sources and strict security policies.

Professionals who want to apply these patterns to their own data can explore Excelgoodies' Power BI Training Singapore programme - taught live by instructors, with certification awarded once a real project is running at work.

Insights compiled through ongoing industry research and discussions within the Excelgoodies Analytics Community.

Power BI

New

Next Batches Now Live

Power BIPower BI
SQLSQL
Power AppsPower Apps
Power AutomatePower Automate
Microsoft FabricMicrosoft Fabrics
AzureAzure Data Engineering
Explore Dates & Reserve Your Spot → Reserve Your Spot →