Forum Discussion
During Power BI Export, How to Reset Default Report Filters Before Applying reportLevelFilters ?
- 5 months ago
Hi Nahid_SJ,
Yes, the method you described using report.bookmarksManager.capture() is a widely used workaround in Power BI Embedded scenarios.
By capturing the report state with:
report.bookmarksManager.capture()
you save the entire current state of the report, including slicers, filters, and visual settings. This captured state can then be used as defaultBookmark in the Export API request, ensuring the export uses the bookmark state you specify instead of the current session filters.
There are several benefits compared to using reportLevelFilters:
It keeps the full report state (slicers, visual filters, page filters, etc.), not just report-level filters.
It prevents conflicts where existing filters combine with reportLevelFilters.
It is effective in dynamic Embedded scenarios, allowing users to adjust slicers and filters during runtime.
The process is:
Capture the current report state with report.bookmarksManager.capture().
Use the captured state as defaultBookmark in the ExportToFile API request.
Export the report with that state.
This approach makes sure the exported file matches the desired state, without needing to clear or restore filters manually. Using captured bookmarks for export state control is a reliable way to manage Power BI Embedded reports with user-modifiable settings.
Thank you.
Hi Nahid_SJ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!