This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi
We are using Power BI Embedded with the Export to File API and passing a fully precomputed bookmark state inside the export request payload.
Our export request looks like this:
{
"format": "PDF",
"powerBIReportConfiguration": {
"datasetToBind": "xxxx",
"identities": [
{
"username": "xxxx",
"roles": ["xxxx"],
"datasets": ["xxxx"]
}
],
"pages": [
{
"pageName": "xxx",
"bookmark": {
"state": "<compressed bookmark state>"
}
}
]
}
}
I observe the filters applied by user (via slicers/UI) are correctly included in the exported result, but the filters applied programmatically with Api setFilters() not included
How can I include filters set via API as well?
Thanks
Solved! Go to Solution.
Hi @DavideBono97,
Thank you for reaching out through the Microsoft Fabric Community Forum.
Based on our understanding, the export operation only respects the state serialized within the bookmark payload along with any explicitly supported export filters. Filters applied interactively through slicers or the user interface are included because they become part of the captured bookmark state. However, filters applied programmatically are treated as runtime or session filters and are not automatically persisted into an already precomputed bookmark state, unless a new bookmark is captured after those filters have been applied.
One possible approach is to first apply the filters using setFilters(), wait for the report rendering to complete by listening to the report.on("rendered") event, then dynamically capture a new bookmark state using await report.bookmarksManager.capture(), and finally pass that captured bookmark state into the Export To File request. Precomputed bookmark states should be regarded as static snapshots and might not automatically incorporate subsequent API filter changes.
Additionally, kindly refer the links below:
Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn
Use filters in a Power BI embedded analytics report | Microsoft Learn
How to handle events in a Power BI embedded analytics application | Microsoft Learn
We hope the information shared above helps resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Hi @DavideBono97,
We would like to follow up and see whether the details we shared have resolved your problem. If you need any more assistance, please feel free to connect with the Microsoft Fabric community.
Thank you.
Hi @DavideBono97,
Thank you for reaching out through the Microsoft Fabric Community Forum.
Based on our understanding, the export operation only respects the state serialized within the bookmark payload along with any explicitly supported export filters. Filters applied interactively through slicers or the user interface are included because they become part of the captured bookmark state. However, filters applied programmatically are treated as runtime or session filters and are not automatically persisted into an already precomputed bookmark state, unless a new bookmark is captured after those filters have been applied.
One possible approach is to first apply the filters using setFilters(), wait for the report rendering to complete by listening to the report.on("rendered") event, then dynamically capture a new bookmark state using await report.bookmarksManager.capture(), and finally pass that captured bookmark state into the Export To File request. Precomputed bookmark states should be regarded as static snapshots and might not automatically incorporate subsequent API filter changes.
Additionally, kindly refer the links below:
Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn
Use filters in a Power BI embedded analytics report | Microsoft Learn
How to handle events in a Power BI embedded analytics application | Microsoft Learn
We hope the information shared above helps resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |