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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jay-sr
New Member

Issue with Applying Page Filters in Power BI ExportTo API

Hello Community,

I am facing an issue while trying to export a Power BI paginated report using the ExportTo API with date filters applied. Despite passing the filters in the reportLevelFilters  as part of the request body and also tried using the URL based filter, the API does not seem to respect the filters, and the exported report includes all data, ignoring the date constraints.

Here is the API endpoint and request payload I am using:

API Endpoint:

Request Body:  

{
format: 'PDF',
powerBIReportConfiguration: {
reportLevelFilters: [{
filter: `order_details/Billing Cycle in ('Cycle 1', 'Cycle 2')`
}],
pages: [
{
pageName: pageName
}
]
}
};

Here is the catch, the filter (order_details/) here is in the page not on the report level filter.

Objective:

I want to filter the data in the exported paginated report to include only rows where the billing cycle in Cycle 1, Cycle 2 (order_details table). However, the report exports with all the data, completely ignoring the filter.

What I Have Tried:

  1. I have get the iframe using the credentials and put this filter over there and it is running fine.
  2. Verified that the Power BI workspace, report ID, and access token are correct.

Issue:

No matter what I try, the exported report does not respect the filters for filtering. It always exports the full dataset instead of applying the billing cycle filter.


Questions:

  1. Is there a specific format for passing page level filters for paginated reports?
  2. Does the ExportTo API support page level filters for paginated reports? If yes, how should the request body be structured?
  3. Has anyone successfully applied date filters in a similar scenario? If so, could you share the correct approach?

Any guidance or suggestions to resolve this issue would be greatly appreciated. Thank you in advance for your help!

Best regards,
Jay Kanara



 
1 ACCEPTED SOLUTION

Hello @lbendlin ,

I have finally resolved the issue! It turns out the problem was not related to the encoding or syntax of the filter. Instead, it was due to a mismatch between the data accepted by Power BI and the data available in the data models.

Thank you once again, @lbendlin , for your response and guidance—it helped me stay on track to identify the root cause.

Best regards,
Jay Kanara

View solution in original post

4 REPLIES 4
jay-sr
New Member

Hello @lbendlin Thank you for taking the time to respond and provide guidance. I truly appreciate your effort to help.
I’ve tried several approaches with the filters, such as:

reportLevelFilters: [{
filter: `order_details/Attempt00x20Count in ('1', '2')`
}]
reportLevelFilters: [{
filter: `order_details/Attempt_00x20_Count in (1, 2)`
}]
reportLevelFilters: [{
filter: `order_details/Attempt00x20Count in (1, 2)`
}],
reportLevelFilters: [{
filter: `order_details/Attempt_00x20_Count in ('1', '2')`
}],

Unfortunately, none of these approaches worked for me. I wanted to clarify that this filter is meant to be applied at the page level, not the report level.

If you have any further insights or suggestions on how to structure the filter correctly for page-level filtering, I would be extremely grateful. Thank you again for your time and assistance!

Best Regards,
Jay Kanara

Please read the documentation again. Your encoding style is incorrect.

 

There is no such thing as page level filters for this scenario. Filters are applied to the data model as a whole.

Hello @lbendlin ,

I have finally resolved the issue! It turns out the problem was not related to the encoding or syntax of the filter. Instead, it was due to a mismatch between the data accepted by Power BI and the data available in the data models.

Thank you once again, @lbendlin , for your response and guidance—it helped me stay on track to identify the root cause.

Best regards,
Jay Kanara

lbendlin
Super User
Super User

Your filter is ignored because you did not escape the special characters in the table name and column name.

 

Filter a report using query string parameters in the URL - Power BI | Microsoft Learn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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