Forum Discussion
dandy-72
2 years agoNew Member
Replace data in PBIX file uploaded to PBIRS (on-prem)
In the recent past, I've used the REST API for Power BI (online) to upload a .PBIX file, and then replaced its data on demand in a C# app I've written with new data generated by some data source (the...
Anonymous
2 years agoNot applicable
Hi dandy-72 ,
1. Upload PBIX to PBIRS using the Import API
2. Create a Dataset
- Unlike Power BI Online, PBIRS does not automatically split the uploaded PBIX into a report and dataset.
- To create a dataset, you’ll need to manually define it using either the Tabular Object Model (TOM) or XMLA.
- TOM and XMLA are suitable for creating regular datasets, but they have some limitations:
- TOM (Tabular Object Model):
- Works for Premium workspaces.
- Requires the XMLA endpoint to have write activities enabled for the assigned capacity.
- XMLA:
- Also works for Premium workspaces.
- Allows you to create and manage datasets programmatically.
- Overcomes the limitations of the REST API (e.g., column count restrictions).
- Requires familiarity with XMLA commands.
- You can use tools like DAX Studio or SSMS to execute XMLA scripts.
- TOM (Tabular Object Model):
3.Updating Data in the Dataset:
- Once you’ve created the dataset, you’ll need to push data into it.
- You can use the Push Datasets API to add rows to your dataset.
- The Push Datasets API is suitable for scenarios where you want to update data frequently.
- Keep in mind that there’s a limitation of 75 columns for push datasets.
4.Rebind the report to the new dataset using the Reports API.
5.Delete the old dataset if needed.
Below is the link will help you:
Upload a local PBIX file using the import API | Microsoft Power BI Blog | Microsoft Power BI
Reports - Export Report - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.