The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I'm using Power BI export feature to generate a pdf version of a report, to get that, Im using export filters when exporting.
But there I need to pass "Not In" filter but if fails in when export.
In the documentation also unable to see it's a limitation. may I know a way of pass Not In condition to export filters when exporting a report.
Thanks in Advance.
Chamila.
Solved! Go to Solution.
Hi @Chamilag,
Thank you for reaching out to the Microsoft fabric community forum. Also @Ritaf1983, for his inputs on this thread. I have identified few workarounds that may help resolve the issue.
I understand you are experiencing issues with the Power BI export feature when trying to apply a "Not In" filter condition.
Currently, the Power BI export filter functionality does not support "Not In" filters, whether using the Export to File API or URL filters. Although this limitation is not explicitly mentioned in the official documentation, the Power BI export engine supports only a limited set of filter operators.
Supported operators include:
Operators such as "Not In" or complex negation logic are not supported, and using them will result in export failure or invalid filter errors.
To achieve the same result as a "Not In" filter, you can try the following. Consider reversing the logic by using an In filter to include only the desired values. For instance, instead of excluding ["North", "South"], include only ["East", "West"]. DAX-based solution. Create a calculated column:
ShowInExport = IF(Sales[Region] IN {"North", "South"}, 0, 1)
Next, apply a filter in your report visuals to display only rows where ShowInExport = 1.
Kindly please refer to the below documentation link for better understanding:
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @Chamilag,
Thank you for reaching out to the Microsoft fabric community forum. Also @Ritaf1983, for his inputs on this thread. I have identified few workarounds that may help resolve the issue.
I understand you are experiencing issues with the Power BI export feature when trying to apply a "Not In" filter condition.
Currently, the Power BI export filter functionality does not support "Not In" filters, whether using the Export to File API or URL filters. Although this limitation is not explicitly mentioned in the official documentation, the Power BI export engine supports only a limited set of filter operators.
Supported operators include:
Operators such as "Not In" or complex negation logic are not supported, and using them will result in export failure or invalid filter errors.
To achieve the same result as a "Not In" filter, you can try the following. Consider reversing the logic by using an In filter to include only the desired values. For instance, instead of excluding ["North", "South"], include only ["East", "West"]. DAX-based solution. Create a calculated column:
ShowInExport = IF(Sales[Region] IN {"North", "South"}, 0, 1)
Next, apply a filter in your report visuals to display only rows where ShowInExport = 1.
Kindly please refer to the below documentation link for better understanding:
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @Chamilag,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Chamilag,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @Chamilag
It's not entirely clear what you're trying to do — are you using the standard export to PDF from the Power BI UI, or calling the ExportToFile API with custom filters?
If you're just excluding a value using standard report filters in the UI (for example: deselecting a value in a slicer or applying a filter like “is not X”), then export should work fine. I just tested it both in Power BI Desktop and in the Service, and it exports with all applied filters as expected.
However, if you're trying to apply a "Not In"
condition through the ExportToFile API, that's a different story.
The export API supports a limited set of operators for filters — such as "In"
, "Equals"
, "Contains"
, etc. — but it does not support "NotIn"
as a valid operator in the advanced
filter type. That’s likely why it fails.
If you’re trying to exclude values programmatically during export, here are a few workarounds:
Apply the logic inside the report itself using DAX or visual/page-level filters.
Use a calculated column that flags the values to include, and filter on that using "Equals"
or "In"
.
If possible, restructure your filter to an allowed operator and logic.
Also make sure you're running the latest version of Power BI, just to rule out any version-specific behavior.
If the problem persists and seems like a bug, you can also open a support ticket with Microsoft for confirmation.
If this post helps, then please consider Accepting it as the solution and giving Kudos to help the other members find it more quickly