There are a number of ways to create a search box in Tableau. It depends on what you want to do. There are in general two kinds of searches: Dimension search or Global search.
Dimension Search
There are two ways to search within a dimension or a column.
- dimension filter search box
Each dimension filter has a search box embedded within. Just drop down the menu list and the search box will appear.
- wildcard search box
The second way is to set up the dimension filter as a wildcard filter, among options like single-select or multi-select filters. This approach is used in this Khan Academy viz.
Global Search
Sometimes we need to search in multiple columns or even all the columns. There come two approaches as well.
- combined field as dimension
We can combine all the columns of interest as a string to form a single column. Then use the above dimension filter for search, such as wildcard search.
- using parameter
This is a method that I saw here by Ken Black and I used it here in data dictionary search viz.
First, create a parameter, Search. The current value is left blank.
Then create a calculated field [Search Filter] as follows:
- CONTAINS(Column1, Search) or CONTAINS(Column2, Search) or CONTAINS(Column3, Search) ...
Voila, just a little summary on how to create search box in Tableau. The above is about using a single keyword to search. If using more than one word, the implementation could be a bit more complicated.
View comments