Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AlexeyRusinov
Helper II
Helper II

Power BI Service connection: change from dev to production

Hello everyone,

 

I am creating a lot of reports for Dynamics 365, and want to deliver it to a lot of users in customer departments and different roles.

My idea was to design a data structure using Query Editor, with all entities that are required for my reports, and publish this dataset.

 

After that, connect to it using Power BI Service Live Connection, test and adjust it, then deploy it to users, changing data source from dev to prod.

However, it occurs to me now that I cannot change a connection here, and have to create a report with the prod connection on the first place.

 

Is it correct? Maybe you can advice me, what is the best way to deliver reports for dynamics 365,  with dev/prod separation?

1 ACCEPTED SOLUTION

@AlexeyRusinov,

In Step 2, I replace PbiServiceModelId rather than PbiServiceGroupId, then save the Connections file and rename it back to PBIX.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-yuezhe-msft
Employee
Employee

@AlexeyRusinov,


Actually, the capability that change connection for Power BI Service dataset is on the team’s backlog. For more details, please take a look at Sirui’s comment in this blog.

Currently, you can try to copy PBIX file to ZIP file, edit Connections file in the ZIP file and rename zip file to PBIX file.

In addition, in Power BI, you can publish PBIX file to "My Workspace" and your App workspaces. Then in Power BI Service, you can create dashboard for your dataset and share the dashboard to other users.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yuezhe-msft, thank you for your response.

 

>Currently, you can try to copy PBIX file to ZIP file, edit Connections file in the ZIP file and rename zip file to PBIX file.

 

I tried it, changed three parts:

  1. ConnectionString, InitialCatalog part is replaced by id of new Dataset id
  2. PbiServiceGroupId, replaced by new workspace id
  3. PbiModelDatabaseName, replaced by new dataset id

After that I save the file, rename back to PBIX, but it cannot connect and return an error "Looks like the we're unable to access the dataset. Please contact the owner of the dataset."

 

Am I doing something wrong? Are there a successful examples of such method?

 

@AlexeyRusinov,

In Step 2, I replace PbiServiceModelId rather than PbiServiceGroupId, then save the Connections file and rename it back to PBIX.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft : 

Hi Lydia.  In previous comment you wrote "In Step 2, I replace PbiServiceModelId rather than PbiServiceGroupId. . .".  I see this comment was made in Aug-2017, and I'm writing this in Feb-2019.

 

I wonder if the PBIX zip file structure/content has changed since then. 

Here is abbreviated/edited content of a current "Connections" file:

 

Initial Catalog=Some-GUID-For-Dataset-Goes-Here;
"PbiServiceModelId":Some7DigitNumber,
"PbiServiceGroupId":"Different-GUID-For-Workspace-Goes-Here",
"PbiModelDatabaseName":"Some-GUID-For-Dataset-Goes-Here"

 

It seems I have all the pieces (in red) I need to manually update this to point it do a different dataset in a different workspace (i.e. belonging to a different customer) - all EXCEPT FOR the "PbiServiceModelId".  How/Where can I get this value?

 

Even though MS is promoting and encouraging the usage of Shared Datasets, they have not provided support for this in automated deployments (i.e. PBI REST API).  Which means we're stuck - we can't deploy to all our customers unless we manually do the steps within Power BI Desktop, which isn't practical for many, many customers.

 

Can you please tell me how/where to get the "PbiServiceModelId" value?

 

Thanks,

Greg

 

Hi,

 

Had the same issue. If it can help, the PbiServiceModelId property is the Dataset's "id" property.

 

You can get it using a variety of ways:

a. Create another PowerBI report referencing the dataset you want the ID of, save it, extract it, and look in the Connections file

b. Use the PowerBI REST API (eg. Get Dataset By ID in Group in my case) - note that this requires authentication, as your browser isn't authenticated on api.powerbi.com

c. Using Chrome or any other developer-friendly browser, open the report list, the Developer Tools, and look in the network responses (in particular, a response from https://*.analysis.windows.net/powerbi/metadata/app), and check the models property for a list of your available datasets in your current workspace.

Anonymous
Not applicable

Hi bcrosnier

 

Thanks for your information.

 

Unfortunately, in case b) the link to get the PbiServiceModelId of a dataset does not work.

Any solutions to get the PbiServiceModelId via API?

 

Here you can find a similar post.

@AlexeyRusinov Connecting to the existing dataset will return you the connections from the dataset and allow you to build on top of it. You won't be able to change the connection.
However, it occurs to me that you might be able to change the original dataset.

Do a quick test. Publish Dev, create another report on the dataset using the live connection to the dataset, publish.

Change the original connection in the 1st PBIX and re-publish. I would assume the 2nd report would also update to using the new one... Or, break.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thank you for you reply @Seth_C_Bauer,

 

>Change the original connection in the 1st PBIX and re-publish 

 

I will need to publish first PBIX to different place, with different people and different 365 domain using them. Will it still work?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors