MetricSign
Start free
High severitydata source

Power BI Refresh Error:
DM_ErrorCode_Connection_TestFailed

What does this error mean?

Power BI could not establish a connection to the data source when testing connectivity. This error typically appears when configuring a new data source or when an existing connection breaks.

Common causes

  • 1The server name or database name in the connection string has changed
  • 2The data source server is not reachable from Power BI Service (cloud) or the gateway machine
  • 3Credentials entered during connection setup are incorrect
  • 4SSL/TLS certificate mismatch or untrusted certificate on the data source server
  • 5The data source requires a gateway but none is configured or the gateway is offline

How to fix it

  1. 1Go to the dataset settings in Power BI Service and verify the data source connection details.
  2. 2If using a gateway, confirm the gateway is online (green status) in Manage gateways.
  3. 3Test the exact connection string in a desktop tool (e.g., SSMS, DBeaver, or Power BI Desktop) from the gateway machine.
  4. 4Check whether the data source server's SSL certificate is valid and trusted by the gateway host.
  5. 5If the server name recently changed (e.g., due to migration), update the connection in Power BI Desktop and republish the dataset.

Frequently asked questions

Does this error affect multiple datasets at once?

If multiple datasets connect to the same data source, yes — all of them will fail until the source connectivity is restored.

Can this error be caused by a server migration or rename?

Yes — if the server name, database name, or connection string changed (e.g., during a cloud migration), Power BI still holds the old connection details. Update the connection in Power BI Desktop and republish.

Does this error appear in Power BI Desktop?

Sometimes — if you open the .pbix file and attempt a refresh, Desktop will surface the same connection error. This is useful for debugging without affecting the Service dataset.

Will the error resolve automatically once the source is back online?

Only if it was a temporary outage. The next scheduled refresh will succeed automatically. If the connection string changed or credentials expired, manual intervention is needed.

Source · learn.microsoft.com/en-us/power-bi/connect-data/refresh-troubleshooting-refresh-scenarios

Other data source errors