Chuck Hooper, former head of Tableau’s consulting organization and a Senturus Tableau trainer, explains how to filter data, using parameters, to create an OR filter condition, instead of the default AND condition.
Using Tableau’s Superstore data, I want a view filtered on a Region OR a State. For example: select “All Data” in the West Region OR in New York. If I use a region filter AND a state filter, I cannot get the desired results.
Tableau parameters to the rescue, in three quick steps:
- Create two parameters: one that contains all the Regions, and one that contains all the States.
- Create a calculated field that compares the parameter for Region to the data field Region, and the parameter for State to the data field for State:
- Filter on the calculated field to “True.” Sample output:
Interested in learning more about Tableau? Our on-demand webinar Tips for Tableau Beginners highlights tips for dashboard design with Tableau Desktop and how to use Tableau to take raw data and quickly make engaging, actionable visuals. This webinar demonstrates how to connect to various data sources and core techniques for visualizing data using the Tableau canvas.
Need additional Tableau training? We offer instructor-led online beginning and advanced courses as well as self-paced, onsite and custom training.
Chuck Hooper’s career includes over five decades of business and IT experience. He started Tableau’s Professional Services consulting organization and was a Tableau Zen Master from 2012-2014. He conducts training sessions on the use of Tableau Software products, and does speaking engagements on visual analytics, data warehouse design, and other business intelligence topics at both the technical and the executive levels.