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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Berty
Frequent Visitor

Cloning and Rebinding Reports for powerbi embedded

I'm trying to create a feature where I can rebind one report interchangeably with multiple datasets. 

 

What do I need to enable to do this? I've tried a couple of ways, but none seemed to work. For example, I

 

1. post a new dataset 

2. clone an existing report

3. rebind the report with the new dataset. Note both old and new datasets have the same schema. 

4. I render it on my client app and all I see is a blank power bi report. 

 

Thanks!

1 ACCEPTED SOLUTION

The one thing I do not see in this thread is an indication of whether you are working with imported datasets or with DirectQuery-mode datasets. That will make all the difference in finding the right answer. I answered another post yesterday that ocvered the same issues.

 

If your project is based on a DirectQuery mode dataset then you can upload the PBIX file to create a new dataset-report pair and then update the datase connection string and configure the credentials for database access using using the .NET Power BI API. It turns out that you don't even need to create multiple PBIX files. You can use a single PBIX file to crate as many imports as you need.

 

If your project is based on an imported dataset is is critical to know one important fact. Power BI Embedded does not yet support server-side dataset refesh on imported datasets. That means you must update the PBIX file using Power BI Desktop and then overwrite the old PBIX import in the Azure workspace with the new version. The other big painpoint we have here is that there is no automated approach to regenerate a PBIX file with the most recent data. You have to fire up BI Desktop and build the PBIX file manually.

 

The bottom line is that today you cannot completely automate the PBIE report publishing process you need if you are using imported datasets. You need to open Power BI Desktop and refresh the data for a specific client before uploading the PBIX file into Power BI Embedded. However, if you takle this approach, I would definitely look at he previous post by @Eric_Zhang and take his suggestion to make use of query parameters to parameterize away the connection string that will change across the PBIX files for each client. 

View solution in original post

5 REPLIES 5
Eric_Zhang
Employee
Employee


@Berty wrote:

I'm trying to create a feature where I can rebind one report interchangeably with multiple datasets. 

 

What do I need to enable to do this? I've tried a couple of ways, but none seemed to work. For example, I

 

1. post a new dataset 

2. clone an existing report

3. rebind the report with the new dataset. Note both old and new datasets have the same schema. 

4. I render it on my client app and all I see is a blank power bi report. 

 

Thanks!


@Berty

What do you mean cloning and rebinding here? When upload a pbix the datasets and report are binded. You can upload a new pbix that override the uploaded one.

@Eric_Zhang

 

THe idea is to create a report templatewhere I reuse the same report for many datasets (with the same schema).


@Berty wrote:

@Eric_Zhang

 

THe idea is to create a report templatewhere I reuse the same report for many datasets (with the same schema).


@Berty

You can try either way

  1. Update connection string. This would allow you to connect to different Azure SQL DB/DW after import pbix to your Power BI Embedded workspace.
  2. Power BI Template
  3. Change the data source in Power BI desktop in advanced editor. You can change the source but leave the transformation alone.
    Capture.PNG

 

For the Update connection string, is it correct for me to assume that I can create new reports programmatically?

 

For example, I import a file called template.pbix with some visualis onto azure. 

 

To create a new report, I clone the report from template.pbix and then rebind the new report to a connection string programmatically. When I go read the new report, I can see the visuals pre-defined in template.pbix with data set by the connection string. 

The one thing I do not see in this thread is an indication of whether you are working with imported datasets or with DirectQuery-mode datasets. That will make all the difference in finding the right answer. I answered another post yesterday that ocvered the same issues.

 

If your project is based on a DirectQuery mode dataset then you can upload the PBIX file to create a new dataset-report pair and then update the datase connection string and configure the credentials for database access using using the .NET Power BI API. It turns out that you don't even need to create multiple PBIX files. You can use a single PBIX file to crate as many imports as you need.

 

If your project is based on an imported dataset is is critical to know one important fact. Power BI Embedded does not yet support server-side dataset refesh on imported datasets. That means you must update the PBIX file using Power BI Desktop and then overwrite the old PBIX import in the Azure workspace with the new version. The other big painpoint we have here is that there is no automated approach to regenerate a PBIX file with the most recent data. You have to fire up BI Desktop and build the PBIX file manually.

 

The bottom line is that today you cannot completely automate the PBIE report publishing process you need if you are using imported datasets. You need to open Power BI Desktop and refresh the data for a specific client before uploading the PBIX file into Power BI Embedded. However, if you takle this approach, I would definitely look at he previous post by @Eric_Zhang and take his suggestion to make use of query parameters to parameterize away the connection string that will change across the PBIX files for each client. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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