Forum Discussion
Skip context apply by matrix visuals columns but keep context from above - allselected not working
- 3 years ago
Based on your explanation, it sounds like you want to ignore the filter context applied by the columns of a matrix visual while still keeping the context from the rows above. To achieve this, you can use the ALLEXCEPT function to remove the filter context for all columns except for the DatesKeyMonths[Month] column, which will be preserved by the ALLSELECTED function.
Here's the modified formula:
CALCULATE( [Sold], FILTER( Product, Product[Index] = 7 ), ALLEXCEPT( DatesKeyMonths, DatesKeyMonths[Month] ), ALLSELECTED(DatesKeyMonths[Month]) )This formula uses the FILTER function to filter the Product table for the product with an index of 7. The ALLEXCEPT function is then used to remove the filter context for all columns in the visual except for the DatesKeyMonths[Month] column. Finally, the ALLSELECTED function is used to preserve the filter context for the DatesKeyMonths[Month] column.
By using ALLEXCEPT instead of ALLSELECTED to remove the filter context for all columns except for the DatesKeyMonths[Month] column, you can preserve the filter context from the rows above in the matrix visual. This should give you the result of 2, which is the total number of products sold for the entire year, instead of 1 for a single month.
Based on your explanation, it sounds like you want to ignore the filter context applied by the columns of a matrix visual while still keeping the context from the rows above. To achieve this, you can use the ALLEXCEPT function to remove the filter context for all columns except for the DatesKeyMonths[Month] column, which will be preserved by the ALLSELECTED function.
Here's the modified formula:
This formula uses the FILTER function to filter the Product table for the product with an index of 7. The ALLEXCEPT function is then used to remove the filter context for all columns in the visual except for the DatesKeyMonths[Month] column. Finally, the ALLSELECTED function is used to preserve the filter context for the DatesKeyMonths[Month] column.
By using ALLEXCEPT instead of ALLSELECTED to remove the filter context for all columns except for the DatesKeyMonths[Month] column, you can preserve the filter context from the rows above in the matrix visual. This should give you the result of 2, which is the total number of products sold for the entire year, instead of 1 for a single month.
- RedPeppery3 years agoFrequent Visitor
That worked thanks a lot.