Forum Discussion

IanR's avatar
IanR
Icon for Helper III rankHelper III
9 years ago
Solved

ALL(Column) doesn't work if Column is created in query editor

Hi,   I have been struggling with some basic filters that use ALL(Column_Name) in a measure to remove the filter on a particular column. Sometimes it works and sometimes it doesn’t. I think I have ...
  • OwenAuger's avatar
    9 years ago

    IanR

    By any chance have you used the "sort by column"  feature on any of the columns involved?

    If so, read this page (along with the solution).

    http://www.sqlbi.com/daxpuzzle/unexpected-filter-behavior-in-calculate/

     

    If not, can you post a sanitised pbix file that exhibits the problem?

     

    On your heretical thought:

    I would say DAX calculated columns certainly have a place.

    If there is no difference in difficulty between adding a column in the Query Editor and DAX, I would favour the Query Editor. That way I can see the final version of the table in the Query Editor, and it is easier to maintain the table. For example, I would avoid running the risk of adding a column in the Query Editor that was also added as a DAX calculated column.

     

    If I need to rely on relationships in the data model or measures in order to calculate a column, I may favour DAX.

    In the end, both types of columns are updated at refresh, so users won't see any difference, and I imagine that differences in performance due to the compression difference would not be noticeable unless tables were very large.