Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
absimpsons
New Member

Export To File In Group with multiple datasets

Hi, I've created a simple javascript solution for exporting a PBI report to a PDF file given a few parameters, namely the datasetId.

 

I have a client who is using a PBI report with multiple datasets, he is reporting that the function returns a bad request when he uses the composite dataset Id.

I'm not sure what else to suggest, is the Export To File In Group API supported for reports with multiple datasets?

1 ACCEPTED SOLUTION

a Power BI report can only connect to a single dataset at a time. A paginated report can connect to multiple, but that's a different case.

With composite models you can connect multiple datasets to that single dataset (using DirectQuery). But the report is still only connected to one dataset.

View solution in original post

5 REPLIES 5
AmosHersch
Microsoft Employee
Microsoft Employee

Hi @absimpsons , 

Basically the Export To File API supports reports connected to composite models. There might be advanced cases, for example if the datasets have data sources with SSO enabled, which I'm not sure are fully supported.

 

Can you please explain what are you doing with the dataset ID? Do you put in the datasetToBind parameter to achieve dynamic binding between the report and dataset?

 

If the API returns bad request, there might be useful information in the response body which can help you understand the reason for the error.

Hi @AmosHersch ,

The dataset Id is being put in the datasetToBind parameter.

 

I'm not sure on whether the data sources have SSO enabled - I'll ask the client.

 

We are also passing in the username, role and permittedDatasetIds in the identities parameter. 

Is that what makes it not supported?

Nothing from the information you've shared so far suggests that your scenario isn't supported.

There could be various reason why an API would return BadRequest.

As I wrote before I would suggest first trying to see if the response with BadRequest contains additional information in the request body. Usually BadRequest indicates that there's some user errors which should be easy to fix.

It turns out the report connects to the underlying datasets using DirectQuery and not a composite dataset. Does that mean the report can't be exported with the data from all 4 of the underlying datasets at once?

a Power BI report can only connect to a single dataset at a time. A paginated report can connect to multiple, but that's a different case.

With composite models you can connect multiple datasets to that single dataset (using DirectQuery). But the report is still only connected to one dataset.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.