Forum Discussion

MARKZI's avatar
MARKZI
Frequent Visitor
6 months ago
Solved

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...
  • MARKZI's avatar
    MARKZI
    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'"
                }
            ]
        },
    }