Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I need to avoid the filter context apllied by the columns of a matrix in order to calculate the total for the full year instead just one month for a particular product.
I have a month table that has a many to one relation with a date table that has a many to one relation with a fact table.
Then I have a product table that is link to the fact table as well.
The formula that I use is this: CALCULATE([Sold],filter(Product,Product[Index]=7),ALLSELECTED(DatesKeyMonths[Month]))
sold is a countrows of factTable
The result should be 2, instead of one, 1 product was sold each month
Solved! Go to Solution.
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.
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.
That worked thanks a lot.
User | Count |
---|---|
42 | |
28 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |