Forum Discussion

Chamilag's avatar
Chamilag
New Member
1 year ago
Solved

Power BI export - filter issue - Not In

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 ex...
  • v-kpoloju-msft's avatar
    1 year ago

    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:

    • eq (equals)
    • ne (not equal)
    • in (in list)
    • lt, le, gt, ge (comparisons)

    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.

    • Pre-filtered Report Pages or Bookmarks: For fixed or predictable scenarios, consider setting up alternate report pages or bookmarks with the filters already applied and export those instead.

     

    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.