Forum Discussion

Berty's avatar
Berty
Frequent Visitor
9 years ago
Solved

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!

  • 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. 

5 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Icon for Microsoft Employee rankMicrosoft 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.

    • Berty's avatar
      Berty
      Frequent Visitor

      Eric_Zhang

       

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

      • Eric_Zhang's avatar
        Eric_Zhang
        Icon for Microsoft Employee rankMicrosoft Employee

        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.