Forum Discussion
ALL/ALLEXCEPT problem
- 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.
- 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.
When used like that in CALCULATE, ALL should be thought of as "Remove Filters From". In fact there is a function called REMOVEFILTERS which is just an alias of all that can only be used inside calculate. Inside calculate it doesn't return all values it removes all directly applied filters.
ALL ( TableName ) removes all filters from the table. ALL ( TableName[ColumnName] ) removes filters that are applied just to that column. It doesn't remove filters applied
to other columns in the same table.
So as johnt75 suggests there are other filters present on the date table but not on your territory table. Eg you're removing any filters directly applied to dayname but if there is a filter on year that would still be present.