Forum Discussion
Cloning and Rebinding Reports for powerbi embedded
- 9 years ago
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.
THe idea is to create a report template, where I reuse the same report for many datasets (with the same schema).
Berty wrote:
THe idea is to create a report template, where I reuse the same report for many datasets (with the same schema).
You can try either way
- Update connection string. This would allow you to connect to different Azure SQL DB/DW after import pbix to your Power BI Embedded workspace.
- Power BI Template
- Change the data source in Power BI desktop in advanced editor. You can change the source but leave the transformation alone.
- Berty9 years agoFrequent Visitor
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.
- TedPattison9 years ago
Microsoft Employee
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.