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 never used this SDK, but I believe you are calling the Post Dataset API.
This API creates a live connections dataset / push dataset / streaming dataset.
You will not be able to connect to a Streaming Dataset from Power BI Desktop.
This dataset is not an actual tabular model. It is a temporary cache, used only with Power BI Dashboards, that should be actively fed with pushed data.
In order to create a Direct Query (DQ) dataset, you will need to implement another approach.
If you use Power BI Premium (dedicated capacity / PPU license), the best course of action will be to use the AMO-TOM Assemblies to create the DQ dataset as an Analysis Services database.
If you do not use Power BI Premium, you will need to call the Post Import and Get Import APIs to upload an actual PBIX file (you may prefer to save it as a serialized base64 string). After the upload, you can use the Update Datasources or Update Parameters APIs to change the connection strings.
Hi,
I am using a Power Bi Premium license, but the scope of my project is to create a model (o more than one if necessary), link SQL sources to the model and generate reports/dashboard for various customers in order to view the processed data. Customer must view data from their related DB connection (they are isolated, not a common one).
Also, I want to make available the model (or a copy of that) to the customer in order to use it in his own Power BI Desktop. The connection details will be sent separately if necessary.
In this moment I am using the Post Dataset API to generate model and connection, but since that his model cannot be shareable between API and power BI Desktop, can i generate the model dynamically in PBIX format, upload it in the solution with Post Import API and use it in both ways (dashboard API and Desktop)?
Also, last question: for this approach, is it required to use a Power BI Premium license for our account that will contain the workspace for all application' models and connections?