1

I am currently working on an issue regards embedding power bi report in our platform. I should say that I am a newbie in Power BI and I have tried to read about the relation between a report, group, and dataset. My problem is related to caching report, datasetId and dataset belong to that report.

Implemented caching?

The current implementation, on one side, caches a report by getting reports after calling client.Reports.GetReportsInGroupAsync. And each time try to get the report by its name as the key. However, on the other side, to get the value of dataSets.IsEffectiveIdentityRequired, it caches the dataset. And each time after getting the report searches in the cache for that dataset to be able to assign IsEffectiveIdentityRequired.

My problem is I get Operation returned an invalid status code 'Bad Request' exception from Power BI API method client.Datasets.GetDatasetByIdInGroupAsync(GroupId, dataSetId) sometimes and my assumption is that they should update the dataset in power bi.

I have tried to find out the answer to these two questions, but I can not find a clear answer 1. What is the relation between Report and DatasetId? Because inside the Report model we have a datasetId, therefore I suppose that one report should be based on one unique dataset. 2. When we update a report, what happens to a datasetId? I get that exception, which means that datasetId is not valid anymore.

1 Answer 1

3
  1. What is the relation between Report and DatasetId?

Normally, when you publish a report from Power BI Desktop to Power BI Online service, it is split into separate report and dataset. They both has the same name (and are in the same workspace/group) but they has their own unique IDs. You can see these unique IDs in the address bar of the browser, when you open the report or the dataset. In the report, there is a link to the dataset, which is used.

{
  "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",  <-- This is the dataset used in the report
  "id": "5b218778-e7a5-4d73-8187-f10824047715",
  "name": "SalesMarketing",
  "webUrl": "https://app.powerbi.com//reports/5b218778-e7a5-4d73-8187-f10824047715",
  "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715"
}
  1. When we update a report, what happens to a datasetId?

When you re-publish the same (modified) report, you will get a message to confirm that the dataset will be overwritten.

enter image description here

But the dataset ID will remain the same. However, if you delete the report and dataset, and publish it again, these IDs will be different.

About the "Bad request" - review the information in the exception. It should hint you why you are getting it. Check the headers of the response, is there one X-PowerBI-Error-Info and if yes, what is the value.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for your answer! Now, I can follow this Report object better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.