Forum Discussion
gus_sharpzen
8 years agoNew Member
How to filter on multiple columns
Suppose a table has FIrst Name, Last Name, Nickname. How can I setup a filter/slicer, etc, that allows users to enter a word, and return the rows with that word maching at least one of the 3 columns....
ignas
7 years agoAdvocate II
Hey all
It is exactly the solution I need. I just need one more update on this solution.
Then I deselect filter it should show a full table. Does anybody know how I can do it?
Thanks in advance.
Regards,
Ignas
- Vvelarde7 years agoCommunity Champion
Hi, a different way:
A new table - ( Modeling - New Table):
Opciones = DISTINCT ( UNION ( VALUES ( Tabla1[FirstName] ), VALUES ( Tabla1[LastName] ), VALUES ( Tabla1[NickName] ) ) )A Measure:
Filtro = VAR Word = SELECTEDVALUE ( Opciones[Options] ) RETURN IF ( HASONEFILTER ( Opciones[Options] ), IF ( CALCULATE ( COUNT ( Tabla1[FirstName] ); Tabla1[FirstName] = Word ) + CALCULATE ( COUNT ( Tabla1[LastName] ), Tabla1[LastName] = Word ) + CALCULATE ( COUNT ( Tabla1[NickName] ), Tabla1[NickName] = Word ) > 0, 1, BLANK () ), 1 )Use this measure in the visual level filter --Is not Blank.
Regards
Victor
- shanker05107 years agoRegular Visitor