Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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?
Solved! Go to 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.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |