Forum Discussion
reportLevelFilter not filtering when using Power BI REST API (ExportTo)
- 6 months ago
Thanks for your support. I have figured out that with the reportLevelFilters option you cannot actually adress slicers, rather you have to add the field into the overall filters-on-this-report panel. Then once added there. The reportLevelFilters works filtering the whole report page on that field eq 'value'. It works both in rest API and also in Power Automate this way. I have found it working with this syntax:
payload = { "format": export_format, "powerBIReportConfiguration": { "pages": [ { "pageName": "your-page-name" } ], "reportLevelFilters": [ { "filter": "yourtablename/yourfieldname eq 'XYZ'" } ] }, }
Hi MARKZI,
Thank you for reaching out to the Microsoft Fabric Community Forum.
As you have already validated the table and column names, the behaviour you are seeing isn’t due to a syntax or Databricks issue. This happens because the ExportTo Power BI REST API does not fully honor slicer-driven or UI-based filtering during export. While reportLevelFilters are supported in the request payload, the export engine doesn’t re-evaluate slicer selections the same way the Power BI service UI does, so the report can export successfully but without the expected filter applied. This is a known limitation of the ExportTo API rather than an issue with your code.
For export scenarios where filtering must be guaranteed, the recommended approach is to use report parameters instead of slicers and drive your DAX logic from those parameters. You can then pass the parameter value directly in the ExportTo request, which is fully supported and works reliably during export.
Microsoft documents this behaviour and recommends parameters specifically for programmatic exports:
1. https://learn.microsoft.com/power-bi/developer/embedded/export-to#report-parameters
2. https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file
Hope that clarifies. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Hi MARKZI,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.
Thank you.
- v-kpoloju-msft6 months agoCommunity Support
Hi MARKZI,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.Thank you.
- MARKZI6 months agoFrequent Visitor
Thanks for your support. I have figured out that with the reportLevelFilters option you cannot actually adress slicers, rather you have to add the field into the overall filters-on-this-report panel. Then once added there. The reportLevelFilters works filtering the whole report page on that field eq 'value'. It works both in rest API and also in Power Automate this way. I have found it working with this syntax:
payload = { "format": export_format, "powerBIReportConfiguration": { "pages": [ { "pageName": "your-page-name" } ], "reportLevelFilters": [ { "filter": "yourtablename/yourfieldname eq 'XYZ'" } ] }, }