Forum Discussion
Filter on Multiple Columns
- 4 years ago
Here is a measure expression that shows one way to do it. I hard coded in A and B, but you could get them dynamically with a disconnected table slicer with the desired values (and store the VALUES of that column used in slicer in another variable, to replace the hard-coded tables).
Has AB in Both =
VAR col1 =
MIN( T1[Col1] ) IN { "A", "B" }
VAR col2 =
MIN( T1[Col2] ) IN { "A", "B" }
RETURN
IF( col1 && col2, 1 )Pat
mahoneypat thanks for your solution, could you please explain how to :
" get them dynamically with a disconnected table slicer with the desired values (and store the VALUES of that column used in slicer in another variable, to replace the hard-coded tables)." ?
I need to let the users select different countries in a slicer than use it to search different columns with countries in it and filter the rows that show the selected countries in any column. It is nearly the same as in this post, as if A and B were countries, but I have to let people choose.