web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Export filtered report...
Power Automate
Suggested Answer

Export filtered report section from Power BI report using Power Automate

(0) ShareShare
ReportReport
Posted on by
Hello,
 
is it possible to automatically apply filters to a report section / visual in Power BI and then export it and send it as an email?
So far, I've only found out how to export the section with the default filters (I guess this depends on the last publication?).
 
Thanks in advance.
Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,893 Super User 2025 Season 2 on at
    Hi,
     

    Solution 1: Use Power BI REST API with HTTP Actions (Recommended)

    This gives you the most control over filters:

    Step 1: Set up HTTP Authentication


    1. Add "HTTP" action in Power Automate

    2. Register an App in Azure AD for Power BI API access

    3. Get authentication token first


    4.  

    Step 2: Apply Filters and Export

    json
    POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo
    
    Headers:
    Authorization: Bearer {your_token}
    Content-Type: application/json
    
    Body:
    {
        "format": "PDF",
        "powerBIReportConfiguration": {
            "reportLevelFilters": [
                {
                    "filter": {
                        "$schema": "http://powerbi.com/product/schema#basic",
                        "target": {
                            "table": "YourTable",
                            "column": "YourColumn"
                        },
                        "operator": "In",
                        "values": ["FilterValue1", "FilterValue2"]
                    }
                }
            ],
            "pages": [
                {
                    "pageName": "YourPageName",
                    "visualFilters": [
                        {
                            "filter": {
                                "$schema": "http://powerbi.com/product/schema#basic",
                                "target": {
                                    "table": "Sales",
                                    "column": "Region"
                                },
                                "operator": "In",
                                "values": ["North", "South"]
                            }
                        }
                    ]
                }
            ]
        }
    }
     

    Solution 2: Use Power BI Paginated Reports (Best for Scheduled Reports)

    Steps:


    1. Convert your report to Paginated Report (.rdl)

    2. Use "Power BI Paginated Reports" connector

    3. Apply parameters dynamically


    4.  

    Power Automate Actions:

    1. Export Power BI Paginated Report
       - Report: {YourPaginatedReport}
       - Parameters: 
         - Region: North
         - StartDate: 2024-01-01
         - EndDate: 2024-12-31
       - Format: PDF
    
    2. Send an email (V2)
       - Attachments: Use output from step 1
     

    Solution 3: URL Parameters with Export (Limited)

    Steps:


    1. Build filtered URL with parameters

    2. Use Power BI "Export to file" action

    3. Apply URL filters

    4.  

    Example URL with Filters:

    https://app.powerbi.com/groups/{workspace-id}/reports/{report-id}/ReportSection?filter=Table/Column eq 'Value'
     

    Power Automate Flow:

    1. Initialize variable: FilteredURL
       Value: "https://app.powerbi.com/groups/12345/reports/67890/ReportSection?filter=Sales/Region eq 'North'"
    
    2. Export Power BI report to file
       - Report: Use dynamic report selection
       - Pages: Specify filtered page
       - Format: PDF
    
    3. Send email with attachment
     

    Solution 4: Power BI Premium Per User (PPU) Solution

    With PPU, you get more advanced export capabilities:

    Flow Structure:

    1. Get rows from Excel/SharePoint (filter criteria)
    2. Apply multiple filters using HTTP action
    3. Export report with applied filters
    4. Send email with customized subject/body

    HTTP Action for Multiple Filters:

    json
    {
        "format": "PDF",
        "powerBIReportConfiguration": {
            "reportLevelFilters": [
                {
                    "filter": {
                        "$schema": "http://powerbi.com/product/schema#advanced",
                        "target": {
                            "table": "Sales",
                            "column": "Date"
                        },
                        "logicalOperator": "And",
                        "conditions": [
                            {
                                "operator": "GreaterThanOrEqual",
                                "value": "2024-01-01"
                            },
                            {
                                "operator": "LessThan",
                                "value": "2024-12-31"
                            }
                        ]
                    }
                }
            ]
        }
    }
     

    Solution 5: Dynamic Filtering with Variables

    Complete Flow Example:

    1. Initialize variables
       - FilterRegion: "North"
       - FilterDate: "2024-07-21"
       - RecipientEmail: "manager@company.com"
    
    2. Compose (Build filter JSON)
       {
           "filter": {
               "target": {"table": "Sales", "column": "Region"},
               "operator": "In",
               "values": [variables('FilterRegion')]
           }
       }
    
    3. HTTP Action - Apply Filter and Export
       Method: POST
       URI: https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo
       Body: Use composed filter JSON
    
    4. Condition - Check if export succeeded
       If Yes:
         - Get file content
         - Send email with attachment
       If No:
         - Send error notification
     
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard