Forum Discussion
Remove filters from other table
This is more a 'cheat way' that works in this example. You're removing all filters from everywhere. However, in my situation, there are also explicit filters in the second table as well as a third table. With Allexcept you would also remove those filters.
Getting back to my original one:
D ( A ( ( C ) , B ) )
Part A
The table reference
selectcolumns ( ... )
Part B
The field calculated (distinctcount cases)
... ) , “test” , ‘table 1’[id] )
Part C
The Context
(...) allexcept ( ‘table 1’ , ‘table 1’[column A] , ‘table 2’[column A] )
Note C1: 'Table1'[Column A] would refer to the implicit filter (External/ Internal).
Note C2: 'Table2'[Column A] would refer to an explicit filter in the second table. This could also be a third table.
Part D
Final calculation
Countrows ( distinct ( ... ) )
So far I'm struggling at the context (Part C) as Allexcept (...) won't allow to have a column from a second table to be included in the allexcept funciton. My second thought was to remove implicit filter and reapply them by a combination of selectedvalue and allselect. However, if one of the selectedvalues is from a second table, I'm not aware of a DAX function that can apply a value in a second related table.
Perhaps a combination of allselected, selectedvalue and userelationship?