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 v-sshirivolu
I've already tried this way
But I get this error :
{
"error": {
"code": "InvalidRequest",
"message": "Export report filter with empty string provided"
}
}
Hi DavideBono97 ,
This error typically occurs when the filter is correctly set up, but Power BI cannot locate a corresponding field in the dataset, resulting in it being treated as an empty string. Please consider the following checks:
Table and column names: Ensure they match exactly with your dataset, including spaces, spelling, and special characters. For instance, verify that your table is named Calendar document and the column is Document - Anni trascorsi da ultimo reload.
Remove aliases: If fields have been renamed in your report, use the original dataset field names.
Value type: For numeric columns, input numbers without quotes (e.g., "values": [5]). For text columns, enclose values in quotes (e.g., "values": ["5"]).
Test with Equals first: Begin by using "operator": "Equals" with a simple value to confirm the filter binds correctly. Once successful, you can switch to LessThan.
For reference, here is a sample test filter:
"reportLevelFilters": [
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "Calendario documento",
"column": "Documento - Anni trascorsi da ultimo reload"
},
"operator": "Equals",
"values": [5]
}
]
If this test is successful, you can then update the operator to LessThan as needed.
- DavideBono9711 months agoHelper I
Hi
I try this solution but not works
This is true name of column and table
The value is numeric
I try with Equal operator but not works
It is possible the error is for the space on the column and table ?
Thanks and sorry
- v-sshirivolu11 months agoCommunity Support
Hi DavideBono97 ,
Thank you for the update.This error can occur if there are spaces or special characters in your table or column names, or if the names do not exactly match those in the dataset schema. Please verify that you are using the original field names from the dataset, rather than any renamed fields from the report. For columns with spaces or hyphens, ensure the spelling matches the dataset precisely.