TGillis
TGillis

Reputation: 31

Power BI error won't go away: "Cannot load model. We couldn't connect to your Analysis Services database."

I'm connecting Power BI Desktop to a Tabular model as my data source, and the model recently changed names.

When I open the report in Power BI Desktop, an error window pops up, and doesn't go away even when clicking on Close or X. Since this error window won't go away, I can't Edit Queries to fix the problem.

Does anyone have any suggestions for how to make the error go away, or how to change the data source without opening the report in Desktop?

Thank you.

Text of the error: Cannot load model. We couldn't connect to your Analysis Services database. Double-check that your server and database names are correct, and make sure you have permission to access them. The Model cube either does not exist or has not been processed.

Upvotes: 2

Views: 14265

Answers (2)

RichB
RichB

Reputation: 41

If only the name of your Tabular Model datasource has changed Power BI will prompt you to edit the connection.

However, if you were connecting to a Perspective which no-longer exists you will get the following error:

Cannot Load Model

We couldn't connect to your Analysis Services database. Double-check that your server and database names are correct, and that you have permission to access them.

The cube either does not exist or has not been processed.

error message

To fix this you must edit the PBIX file directly.

Rename the file as a zip and extract it.

In the root folder there is a 'Connections' file. Edit it to remove the 'Cube=' reference:

{"Version":1,
"Connections":[{"Name":"EntityDataSource",
"ConnectionString":"Data Source=TEST-DB;Initial Catalog=TestAS;Cube=Labour",
"ConnectionType":"analysisServicesDatabaseLive"}]}

becomes

{"Version":1,
"Connections":[{"Name":"EntityDataSource",
"ConnectionString":"Data Source=TEST-DB;Initial Catalog=TestAS",
"ConnectionType":"analysisServicesDatabaseLive"}]}

Then delete the 'SecurityBindings' file. If you don't Power BI with throw this error:

Unable to open document

This file is corrupted or was created by an unrecognized version of Power BI Desktop. It can't be opened.

unable to open document error

Now zip the files up again and rename it as a .pbix file.

If you still get a 'corrupted file' message be sure you did not include the folder that you expanded the PBIX into in the new zip. The root of the new zip file must hold the Reports folder, [Content_Types].xml, Connections, DataMashup, etc

AFAIK You can make any change to a PBIX file this way, the key is to delete SecurityBindings.

Upvotes: 2

Mehul Patel
Mehul Patel

Reputation: 1

Please open the powerbi file in the older version and there it will allow to change the connection.

Upvotes: -1

Related Questions