Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

ALL/ALLEXCEPT problem

Dear community,    I'm working through the Supercharge PowerBI book and I'm running into something that I just don't understand.    I have a matrix with Country as a filter and I'm comparing the ...
  • johnt75's avatar
    johnt75
    4 years ago

    You are indeed correct, its using the 'Calendar'[DayNumberOfWeek] column. The reason is that the 'Calendar'[DayName] column is sorted by 'Calendar'[DayNumberOfWeek], so Power BI has to include that in the underlying summary table so that it can display it correctly in the visual.

    If you add a REMOVEFILTERS or ALL on 'Calendar'[DayNumberOfWeek] to your measure as well as the existing one on 'Calendar'[DayName] then that should give you the results you are expecting.

  • johnt75's avatar
    johnt75
    4 years ago

    In a table or matrix visual, the column and row headings are applied to each individual cell to calculate the value for that combination of filters, so if you had months in the row, and day of week in the columns, then for each cell it would use ( month, day of week ) as a combined filter.

    Possibly the best way to think of sort columns is as if they were hidden headers, so they too get included in the filter, so in my previous example the filters applied would actually be ( month, month number, day of week, day of week number ) as each of the base columns requires a sort column to be included.