Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
We have a PowerBI embedded in our web app. We use C# SDK to export report to a PDF file. Export uses filters applied to the report embedded in the web app to request PDF download.
Those filters were working just fine until all of a sudden they are completely ignored. So exported PDF report shows report for all data ignoring passed filters. If I apply those filters visually in powerbi portal, data is properly filtered & shown on the report.
Rougly this is the code being used
var powerBiReportConfig = new PowerBIReportExportConfiguration()
{
ReportLevelFilters = reportLevelFilters,
Identities = new List<EffectiveIdentity> { effectiveIdentity },
Settings = new ExportReportSettings { IncludeHiddenPages = false }
};
var requestParams = new ExportReportRequest
{
Format = FileFormat.PDF,
PowerBIReportConfiguration = powerBiReportConfig,
};
var export = await powerBiClient.Reports.ExportToFileAsync(groupId, reportId, requestParams);
Filter that is applied to the report in embedded mode is
{
"ReportLevelFilters": [
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "MyTable",
"column": "UniqueNumber"
},
"filterType": 1,
"operator": "In",
"values": [
"7627043-7627043"
]
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "MyTable2",
"column": "UniqueNumber"
},
"filterType": 1,
"operator": "In",
"values": [
"7627043-7627043"
]
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "MyTable",
"column": "CreationDate"
},
"filterType": 1,
"operator": "In",
"values": [
"2024-06-21T00:00:00"
]
},
{
"$schema": "http://powerbi.com/product/schema#basic",
"target": {
"table": "MyTable",
"column": "CreationDate"
},
"filterType": 1,
"operator": "In",
"values": [
"2024-06-21T00:00:00"
]
}
]
}
which is getting translated to this to be sent via SDK
var reportLevelFilters = new List<ExportFilter> {
new ExportFilter { Filter =
"MyTable/UniqueNumber in ('7627043-7627043') and MyTable2/UniqueNumber in ('7627043-7627043') and MyTable/CreationDate in ('2024-06-21T00:00:00') and MyTable/CreationDate in ('2024-06-21T00:00:00')" }};
What could have caused this ignoring the filters ? Can you suggest what to check ?
Solved! Go to Solution.
Hi @gmanvel ,
Check whether there are any changes to the table or column names referenced in the Power BI filters to ensure that no changes have occurred to the report or dataset that could affect the applicability of the filters, and that any discrepancies may result in the filters being invalidated during the export process.
Filters are suddenly ignored, you can check whether the user or service account has the necessary permissions to access the filter data and use Power BI and SDK is the latest version, Power BI updates and export PDF of the relevant limitations may result in the application of the filter does not match.
Power BI Blog—Updates and News | Microsoft Power BI
NuGet Gallery | Microsoft.PowerBI.Api 4.20.0
Export reports to PDF - Power BI | Microsoft Learn
This is the related document, you can view this content:
c# - Exporting PDF format from Power BI embedded with report filters - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gmanvel ,
Check whether there are any changes to the table or column names referenced in the Power BI filters to ensure that no changes have occurred to the report or dataset that could affect the applicability of the filters, and that any discrepancies may result in the filters being invalidated during the export process.
Filters are suddenly ignored, you can check whether the user or service account has the necessary permissions to access the filter data and use Power BI and SDK is the latest version, Power BI updates and export PDF of the relevant limitations may result in the application of the filter does not match.
Power BI Blog—Updates and News | Microsoft Power BI
NuGet Gallery | Microsoft.PowerBI.Api 4.20.0
Export reports to PDF - Power BI | Microsoft Learn
This is the related document, you can view this content:
c# - Exporting PDF format from Power BI embedded with report filters - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
10 | |
8 | |
5 | |
5 | |
4 |