Forum Discussion
ExportTo PowerBI - Api ExportTo
- 11 months ago
I did a test with spaces in the table name and column name:
Table name: ex1 renamed
Column name: Column three
This requeust body produced a filtered result:
Reqused body:
{
"format": "PDF",
"powerBIReportConfiguration": {
"settings": {},
"reportLevelFilters": [
{
"filter": "ex1_x0020_renamed/Column_x0020_three lt 0"
}
]
}
}
Hi DavideBono97 ,
Thanks for reaching out to Microsoft Fabric Community Forum.
Try this Solution
Please use the correct asynchronous export flow:
Step 1 – Start Export
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/ExportTo
Returns an exportId.
Step 2 – Poll Export Status
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/exports/{exportId}
Do not use /status. Poll until "Succeeded" or "Failed".
Step 3 – Download File
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/exports/{exportId}/file
Example Flow
Start export - get exportId = abc123
Poll: GET …/exports/abc123 → returns "Succeeded"
Download: GET …/exports/abc123/file
Reference :
https://learn.microsoft.com/en-us/power-bi/developer/embedded/export-to
Best Regards,
Sreeteja.
Hi
I don't have a problem with export-to operations, I already use these
My problem is the reportLevelFilters, this is ignored
I'm asking you if I'm using the wrong syntax
Thanks
- v-sshirivolu11 months agoCommunity Support
Hi DavideBono97 ,
The reason your filter is ignored is because reportLevelFilters does not accept plain strings.
You need to pass it in the official filter schema format, for example:"reportLevelFilters": [
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Calendario documento",
"column": "Documento - Anni trascorsi da ultimo reload"
},
"operator": "LessThan",
"values": [5]
}
]This way the filter will be applied correctly during ExportTo.
Ref: Power BI embedded analytics documentation - Power BI | Microsoft Learn