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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
DavideBono97
Helper I
Helper I

Power BI Embedded Export ignores programmatically set filters in Bookmark state

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

1 ACCEPTED SOLUTION
v-pnaroju-msft
Community Support
Community Support

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.

View solution in original post

2 REPLIES 2
v-pnaroju-msft
Community Support
Community Support

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.

v-pnaroju-msft
Community Support
Community Support

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.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors