Forum Discussion
flyinggnugget
2 years agoFrequent Visitor
Remove all but one filter context from variable table
Hi, I am trying to work on a measure that creates a table variable and then calculate the distinct rows of that table variable. I am trying to remove all filter context from that table except for...
Anonymous
2 years agoNot applicable
Hi, flyinggnugget
You can try using the function, which retains the filters on the specified columns while removing the filters on all other columns:
measure =
VAR temp_table =
CALCULATETABLE(
ALLEXCEPT('Table1', 'Table1'[Country]),
ALLSELECTED('Table1'[Country])
)
RETURN
COUNTROWS( DISTINCT (SELECTCOLUMNS(temp_table, "value", [Country])))
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.