Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
gmanvel
New Member

PDF export ignores passed filter

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 ?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.