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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
MARKZI
Frequent Visitor

reportLevelFilter not filtering when using Power BI REST API (ExportTo)

Hello, 

 

i have set up a databricks notebook that connects to the Power BI Services via Token. I'm trying to export the Dashboard to a pdf to send it via email. Everything in my code works, except the part where i need to filter my dashboard by one id before exporting it.  In my dashboard i have a slicer set to the "my_existing_column_name" and i have cheked that both column and table are existing and dont have any spelling mistake. I'm not using Power Automate. Instead i'm directly calling the api:

payload = {
    "format": export_format, 
    "powerBIReportConfiguration": {
        "pages": [
            {
                "pageName": "replaced_for_security" 
            }
        ],
        "reportLevelFilters": [
            {
                "$schema": "http://powerbi.com/product/schema#basic",
                "target": {
                    "table": "my_existing_table_name",
                    "column": "my_existing_column_name"
                },
                "operator": "In",
                "values": ["S1 0.3"]
            }
        ]
    },
}

This is the syntax that i have found here (last reply):

https://community.fabric.microsoft.com/t5/Developer/ExportTo-PowerBI-Api-ExportTo/m-p/4807863

 

However this isn't working for me. Any ideas why my report is not getting filtered?

2 REPLIES 2
v-kpoloju-msft
Community Support
Community Support

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors