Forum Discussion
Anonymous
7 years agoNot applicable
Simple count but with multiple variables in the column
Hey guys so my issue is that I have a table of lets say 3 counties A, B and C. And another table that has a row a column of "Contries for" but in this table you could have more than one contry listed...
- 7 years ago
Anonymous
Try this MEASURE
Measure = COUNTROWS ( FILTER ( Table2, SEARCH ( SELECTEDVALUE ( Table1[Countries] ), [Countries For], 1, 0 ) > 0 ) )
Zubair_Muhammad
Community Champion
7 years agoAnonymous
If they are linked somehow, i believe you can use ALL function to remove the FILTER context
Measure =
COUNTROWS (
FILTER (
ALL(Table2),
SEARCH ( SELECTEDVALUE ( Table1[Countries] ), [Countries For], 1, 0 ) > 0
)
)Anonymous
7 years agoNot applicable
Zubair_Muhammad
Yes worked perfectly!
I am trying to wrap my head around the thought process of this function, if you coud describe how it works would be much appreciated!