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"
}
]
}
}
DavideBono97did you try applying the same filter string in Power BI web portal through the URL as explained here Filter a report using query string parameters in the URL - Power BI | Microsoft Learn ?
Usually if the filter string works in the URL the same string will also work in the ExportTo API.
You should certainly not use the basic filter schema when calling the exportTo API.
- DavideBono9711 months agoHelper I
Hi
Thanks for the updateWith url filter it works
With this string with special characters because my table and columns have the space
&filter=Calendario_x0020_documento/Documento_x0020__x002D__x0020_Anni_x0020_trascorsi_x0020_da_x0020_ultimo_x0020_reload eq 1
But in Api I don't expect to write it this way
Could it be the fault of the spaces on the API too?
Thanks to both of you AmosHersch v-sshirivolu
- AmosHersch11 months agoMicrosoft Employee
DavideBono97 did you try the same string with special characters in the API? It might be an issue with the spaces.
- DavideBono9711 months agoHelper I
AmosHersch with this syntax not works
"reportLevelFilters": [
{
"filter": "Calendario?x0020?documento/Documento-x0020?x0020?x002D-x0020?Anni?x0020?trascorsi?x0020?da?x0020?ultimo-x0020?reload eq 1"
}
]I have 200 status code but the filter is ignored
With this syntax i get the same error "Export report filter with empty string provided"
"reportLevelFilters": [
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Calendario?x0020?documento",
"column": "Documento-x0020?x0020?x002D-x0020?Anni?x0020?trascorsi?x0020?da?x0020?ultimo-x0020"
},
"operator": "Equals",
"values": [1]
}
]