1. Filtering and sorting
Welcome to chapter two, where we will cover the basics of building and customizing visualizations.
We will start with filtering and sorting.
2. Filtering
Filtering is a natural step in creating visualizations and you've already done some in the first chapter.
Filtering involves deciding what should be kept and excluded from a view, from filtering by category, date range, location, or a minimum value.
3. Types of filters in Tableau
Filtering can happen at multiple points in the user flow of Tableau. So there is an order of operations to when filters are executed. Order matters, especially if you are fetching top records.
The first two, extract and data source filters, occur when you are connecting and loading data sources. This usually happens before opening a worksheet.
Context filters are a more advanced feature that won't be covered in this course.
The last two occur in the worksheet and they will be our focus.
4. Dimension filters (in blue)
Remember that dimension fields are often categorical data, so when you are filtering on dimension, it usually has to do with selecting which categories to keep or exclude.
For example, we can do this with room type in the last chapter.
There are other options such as creating a wildcard that looks for matches in characters, or setting conditions based on other fields.
You can also return the top or bottom records.
5. Measure filters (in green)
Measures contain quantitative data, which means we're filtering numbers rather than categories.
Another set of filters are applicable to measures, from specifying a range of values or selecting null or non-null values.
6. Sorting
Sorting is another fundamental step in creating a visualization and more straightforward compared to filtering.
Tableau defaults on alphabetical sorting on dimension, which is not always ideal.
An important alternative is sorting by a metric, whether it's ascending or descending value.
For example, sorting products by their gross profit makes a way more interesting visual than sorting products alphabetically.
7. Dataset
In the next several exercises, we will be using the gapminder dataset which is publicly available and contains a variety of social, economic and environmental development indicators for countries.
Specifically, we will look look at the average number of cell phones and broadband subscribers per 100 people at the country level.
This metric can be used to evaluate a country’s development in communication infrastructure.
8. Let's practice!
Time to try out sorting and filtering on Tableau!