
Announcements
This gives you the most control over filters:
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"]
}
}
]
}
]
}
}
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
https://app.powerbi.com/groups/{workspace-id}/reports/{report-id}/ReportSection?filter=Table/Column eq 'Value'
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
With PPU, you get more advanced export capabilities:
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
{
"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"
}
]
}
}
]
}
}
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