Logo
banner

Blogs

Power BI > REST API – RebindReport issue

, May 22, 2020 167 Views

Power BI has advanced a lot since the last few years.
We all know, that now, Power BI REST API provides service endpoints for various functionalities such as embedding, administration, interaction with report & user resources.

While working on the scenario of maintaining different environments for Power BI reports such as “DEV”, “TEST” and “PROD”, as discussed in one of our previous blogs, we stumbled upon an issue in one such REST API – RebindReport.

We had created separate Workspaces for each of the environment and we were using a ‘Shared Dataset’ which was in a completely separate workspace – SharedDatasets. We developed a Power Shell Script that copies all the reports from one workspace to another workspace and rebinds those reports with another specified dataset.

For this, we export all reports from one workspace and import them to another workspace. While working on this, we observed a weird behavior.

Let’s understand it with one simple example as follows:
1. I have a report named report1 in “DEV” workspace, which is pointing to a shared dataset named “DevDataset” in “SharedDatasets” workspace

2. Next, I copied this report to another workspace called “TEST” and then rebound report1 to “TestDataset” which is also a shared dataset in the “SharedDatasets” workspace using Power BI REST API – “RebindReport”.

3. Now, if I download this report (post rebinding, i.e rebound with TestDataset) as .pbix & check, it still points to the “DevDataset” rather than “TestDataset”.

4. Please know that in Power BI service, it still shows the data pulled from “TestDataset” in the “TEST” workspace for this same report.

After observing this behavior, I tried hard to fix this for many days, but it proved to be a hard nut to crack. We turned to our last resort – Power BI Community Forum for the help and the community members have confirmed that this is a bug in the Power BI REST API since it was published. They will work on it and fix this in the near future.

Please refer to the below link of my community post & its solution:
Rebind – Power BI REST API clarification

The reason behind writing this blog is that many of us might not be aware of this issue and would end up wasting our precious time in finding the crux of the matter. We hope that this blog will save our fellow Power BI Developers facing this issue, a lot of time and energy. Let’s hope that the Power BI team resolves this issue as soon as possible.

Happy Reporting!

Admin

More posts by

Leave a Reply

Your email address will not be published. Required fields are marked *