Forum Discussion
Power BI Api approach for dynamic report generation
- 4 years ago
Hi ms92ita,
Yes. You should create a dataset for each customer and then generate an embed token with the right DatasetID.
In addition, you should add the following to the config object:datasetBinding: { datasetId: "<DatasetId>" }See dynamic binding and bind datasets dynamically to a report
Hi ms92ita,
I'm not sure that I understand your question.
Do you have a couple of reports, published to the Power BI Service, connected to a DQ dataset that points to a sample customer?
I assume you mean reports (not dashboards). right? Dashboards are much more limiting from a programmatic point of view.
You'll need to create the additional datasets using the Post Import API and then change the connections using the Update Datasources or Update Parameters APIs.
This will allow customers to connect using Power BI Desktop and allow you to use dynamic binding in order to present the reports with the right data content to users connecting to your application (using the dataset ID).
Hi,
my request was for reports. Since that a report can be accessible from several customers at the same time, in order to accomplish my requirements do I have to prepare multiple datasets (one for each customer because of different connection credentials) and then generate the embed token with the correct dataset ID at runtime per customer?
Probably using a single dataset and update credentials from API is not the best solution.