Forum Discussion

Jaykumar31's avatar
Jaykumar31
Frequent Visitor
1 year ago
Solved

Data limit Filter Issue

Hello, 

 

My table has only two columns: ID and Product. The table query is a simple SELECT statement with no filtering conditions. I created a Bar Chart and applied a data limit filter of 10. However, as soon as I applied the filter, I received the following error:

> "When a filter condition uses the In operator with a table argument, all of the expressions and all of the projections in the table must be column references."

I checked that the column data types match the database columns, and I haven't used any filters directly on my table.

 

Could you please help me understand why I am getting this error?

 

 

  • v-dineshya's avatar
    v-dineshya
    1 year ago

    Hi Jaykumar31 ,

    I try to download March 2025 version from document link it's working. Please refer snap

     

    Please uninstall your Power BI desktop and clear cach and download the previous version from document and try to install. As you mention that, for previous versions you are not facing error. try to download and install that version and check. And, if you have any further query do let us know.

     

    Thank you.

     

11 Replies

  • Are you getting this error in Power BI or SQL can you share screenshot

    • Jaykumar31's avatar
      Jaykumar31
      Frequent Visitor

      HI bhanu_gautam  - Thanks for your response. I am encountering this error in Power BI and have attached an image in the post.

  • v-dineshya's avatar
    v-dineshya
    Community Support

    Hi Jaykumar31 ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    The error you are encountering in Power BI, it caused by how the data limit filter is being applied in your bar chart.

    When you apply a data limit filter like Top N or a custom filter using the IN operator, Power BI internally constructs a table expression. If that expression includes anything other than direct column references, such as calculated columns, measures, or expressions it violates the requirement for the IN operator, which expects only raw column references.

    Solution: Check the filter logic in your visual or DAX query. You are not using calculated expressions or measures in the IN clause. The table used in the filter is a simple reference like SELECTCOLUMNS(Table, "ColumnName", Table[ColumnName]). Instead of using a custom filter with IN, try using the built-in Top N filter in the visual pane Or create a separate table with the top 10 IDs or Products and use that as a slicer or filter.

    If this information is helpful, please “Accept it as a solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
    Thank you.

    • Jaykumar31's avatar
      Jaykumar31
      Frequent Visitor

      Hello v-dineshya , I am not using any kind of filter or any DAX query. It is simply two columns from the table, displayed in a clustered column chart. I was surprised that this error did not appear in the earlier version of Power BI Desktop. I have the latest version installed: Version 2.144.679.0 (64-bit) – June 2025

      There is no option on the Microsoft website to download an earlier version of Power BI Desktop.

  • Sreejisha's avatar
    Sreejisha
    Frequent Visitor

    There are 2 ways to solve this:

    - Use TOP N instead of Data Limit

    - Use calculated measure in Y axis. For eg: Instead of using Sum(Sales) in Y axis. Create a calculated measure like 'Total Sales' and use that measure in Y axis.