cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevhav Helper V
Helper V

Change dataset for "Power BI service" live connection?

I have a dataset, in "Import" mode, that I've published to two app workspaces. So: WorkspaceA and WorkspaceB, each having an identical copy of the dataset.

 

I had created a report in Power BI Desktop, with a "Power BI service" live connection to the dataset in WorkspaceA.

 

Now, I want to change the connection to point to the same dataset in WorkspaceB. I go to Edit Queries --> Data Source Settings; click the "Refresh" button; and select the same dataset in WorkspaceB.

 

I believe I had tested this in the last 1-2 weeks, and it worked fine. But now, it's not working. After making the change, all my visualizations say "Can't display this visual. See details." And in the details, it says a bunch of stuff, including:

Client Error Code:
ServiceErrorToClientError

Error Details:
An exception of type System.InvalidOperationException occured.

Stack Trace:
System.InvalidOperationException: No session exists for database with ID:7f...43

"Database ID" is the same as the "dataset ID" that I can see in the Power BI Service URLs, right? I think I confirmed this is true.

 

But...I don't seem to have a dataset with ID = 7f...43! So, I wondered, where did it get 7f...43? I tried repeating these exact steps again, and got the same error, except now it said: "No session exists for database with ID:6f...78"

 

I tried a third time, and it said: "No session exists for database with ID:89...54"

 

Huh?! Where is it getting these random database IDs?

 

I can look in the Power BI service, and see that the dataset ID of the dataset I want—the one in WorkspaceB—is: f7...ed

 

I should note that after creating this .pbix report file with the "Power BI service" live connection, I have since modified and re-published the dataset. I re-published it to both WorkspaceA and WorkspaceB, naturally. With the same dataset name. (But the modifications don't break the visualizations.) I wonder if this is causing the issue? (But it shouldn't be!)

 

It seems that re-publishing a new version of the dataset results in a new dataset ID. Right?

 

But like I said, in the "Data Source Settings" screen, I'm clicking the little refresh button. That should ensure that Power BI Desktop is getting the current dataset IDs from the Power BI Service, shouldn't it?!

 

But it's weird that every time I try it, I get an error message with a different dataset ID.

 

Is this a bug? Please help! Like I said, I had tested this and thought it would be easy to re-point a "Power BI service" live connection to a different copy of the dataset.

 

And/or, is there any other way for me to change the connection? I read other threads about changing the .pbix file extension to .zip, then modifying the "Connections" file. I tried this, but (a) it won't let me modify and save over the "Connections" file, when it is within the .zip file. It says "You can't save to...Please choose another location." And (b) when I try extracting all the files from the .zip file, then modifying the "Connections" file, then sending the files to a zipped folder again, then changing the .zip to .pbix...Power BI Desktop won't open the file. It complains about it being "corrupted," or something like that.

1 ACCEPTED SOLUTION

Accepted Solutions
kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

I found a solution, of sorts!

 

After changing the data source and having all my visualizations say "Can't display this visual. See details"...then I tried clicking the "Refresh" button, to "Get the latest data." This did not change anything.

 

But then I tried saving the .pbix report file, despite all my visualizations saying "Can't display this visual. See details." Then I closed the .pbix file and re-opened it. This did the trick -- now everything works, and in the bottom-right corner I can see it says "Connected live to the Power BI dataset: ..." and it shows the correct name of the dataset -- the one in WorkspaceB.

 

(I gave the dataset different names, in WorkspaceA and WorkspaceB.)

 

Something still seems buggy, but at least I can work with this for now.

View solution in original post

12 REPLIES 12
kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

Oh, I just tested it, and re-publishing a new version of the dataset, by overwriting the existing one on the Power BI Services, does not actually change the dataset ID.

 

So, I don't get it.

kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

I found a solution, of sorts!

 

After changing the data source and having all my visualizations say "Can't display this visual. See details"...then I tried clicking the "Refresh" button, to "Get the latest data." This did not change anything.

 

But then I tried saving the .pbix report file, despite all my visualizations saying "Can't display this visual. See details." Then I closed the .pbix file and re-opened it. This did the trick -- now everything works, and in the bottom-right corner I can see it says "Connected live to the Power BI dataset: ..." and it shows the correct name of the dataset -- the one in WorkspaceB.

 

(I gave the dataset different names, in WorkspaceA and WorkspaceB.)

 

Something still seems buggy, but at least I can work with this for now.

View solution in original post

kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

Also, after getting it to "work" in this way, I changed the file extensions to .zip, and looked at the contents of the "Connections" files.

 

The original version, before changing the data source, was:

 

{
  "Version": 1,
  "Connections": [
    {
      "Name": "EntityDataSource",
      "ConnectionString": "
         Data Source=pbiazure://api.powerbi.com;
         Initial Catalog=bd...c5;
         Identity Provider=\"https://login.microsoftonline.com/common, https://analysis.windows.net/powerbi/api, 7f...cf\"
      ",
      "ConnectionType": "pbiServiceLive",
      "PbiServiceModelId": 3...5,
      "PbiServiceGroupId": "5a...ed",
      "PbiModelVirtualServerName": "sobe_wowvirtualserver",
      "PbiModelDatabaseName": "bd...c5"
    }
  ]
}

After having changed the data source, it is now:

 

 

{
  "Version": 1,
  "Connections": [
    {
      "Name": "EntityDataSource",
      "ConnectionString": "
         Data Source=pbiazure://api.powerbi.com;
         Initial Catalog=f7...ed;
         Identity Provider=\"https://login.microsoftonline.com/common, https://analysis.windows.net/powerbi/api, 7f...cf\";
         Integrated Security=ClaimsToken
      ",
      "ConnectionType": "pbiServiceLive",
      "PbiServiceModelId": 3...9,
      "PbiServiceGroupId": "ab...8e",
      "PbiModelVirtualServerName": "sobe_wowvirtualserver",
      "PbiModelDatabaseName": "f7...ed"
    }
  ]
}

So I confirmed it switched to the f7...ed dataset ID. Good.

 

Curiously, it added a new element to the ConnectionString: the 'Integrated Security=ClaimsToken' part. I can't guess what that is. But I tested it, and that new element seems to appear in any new .pbix file I create with a "Power BI service" live connection. I guess maybe this new element is included in files that were created with the November release of Power BI, whereas my "original version" was created weeks ago, when I was using an earlier release.

 

Highlighted
Microsoft v-huizhn-msft
Microsoft

Re: Change dataset for "Power BI service" live connection?

Hi @kevhav,

Congratulations, you have resolved your issue by yourself. Please mark your solution as answer, so more members here will find workaround easily and clearly.

Best Regards,
Angelia 

kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

Done. But @v-huizhn-msft, would it be possible for you note this as an issue/bug, to be addressed by Microsoft?

Anonymous
Not applicable

Re: Change dataset for "Power BI service" live connection?

Thank you for that. We had the similar issue

mravestein Advocate I
Advocate I

Re: Change dataset for "Power BI service" live connection?

Hi,

 

I know a solution I marked, but let me comment how I fixed it for other people that are looking for this in the future.

 

In your original post you've mentioned a .pbix to .zip approach (I also got the 'corrupted' message). Then I got this working for me by:

- Create a .pbix file with a connection the dataset that I want to use

- Save the .pbix file and rename it to .zip

- Open de .zip and extract the file 'Connection'

 

- Then I created a .zip file from the report were I want to change the dataset.

- Open the .zip file 

- Drag the 'Connection' file into the .zip explorer  (it had overwritten the original 'Connection' file in my .zip)

- Close .zip explorer and rename the file to .pbix

 

*I used the tool 7Zip to update the 'connection' file, I have not tested it with other .zip extraction tools

 

Still it would be nice if Microsoft comes with a OOTB solution, so we don't have to trick PowerBI whitch I would imagine is not supported ofcourse.

1tcook
Frequent Visitor

Re: Change dataset for "Power BI service" live connection?

Tried it using built in windows zip utility and 7zip. No luck. I was able to download a version from the service but the orginal was connected to another data model. I had to create a copy in the service but now I have the entire model.....

kevhav Helper V
Helper V

Re: Change dataset for "Power BI service" live connection?

@mravestein and @1tcook , I believe this was "resolved" some time ago. Power BI Desktop now has a feature to let you change the dataset to which your report is pointing...

 

If you have a .pbix file that is a report with a live connection to a dataset in the Power BI Service, then just click "Transform data" > "Data source settings" (using the new ribbon), and it will prompt you to select a new dataset to use.

 

Also note that with the new workspace experience and shared datasets, you now are able to share a dataset across workspaces. So in my original post, where I talked about having WorkspaceA and WorkspaceB, each with its own copy of a dataset...we no longer have that. We now only have one copy of the dataset in the Power BI Service, and it is shared, so that we can create reports that use a live connection to that dataset, and publish those reports to other datasets.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors