Forum Discussion
dougyk23
4 years agoNew Member
Search multiple tables/visuals with on textbox that a user inputs the search term
If i have 3 tables, each with multiple columns where there are no relationships. But they have either an email address or firstname or lastname fields. I would like a way for a user to enter part of ...
DataInsights
Super User
4 years ago
Try this solution.
1. Create a calculated table for the columns you want to search:
SearchTable =
DISTINCT (
UNION (
DISTINCT ( Table1[Email address] ),
DISTINCT ( Table2[First Name] ),
DISTINCT ( Table2[Last Name] ),
DISTINCT ( Table3[Name] )
)
)
2. Rename the column in this table to "Value".
3. Create measure:
Search Filter =
IF ( MIN ( Table1[Email address] ) IN VALUES ( SearchTable[Value] ) ||
MIN ( Table2[First Name] ) IN VALUES ( SearchTable[Value] ) ||
MIN ( Table2[Last Name] ) IN VALUES ( SearchTable[Value] ) ||
MIN ( Table3[Name] ) IN VALUES ( SearchTable[Value] ), 1
)
4. Add the measure [Search Filter] as a visual filter for each table visual (Search Filter is 1):
5. Using the Text Filter visual, search for a value:
TheoC
Community Champion
2 years agoDataInsights mate, this is brilliant. Well done! Hopefully the original poster dougyk23 will mark this as a solution given that you've gone out of your way to put this together.