When cleaning your data, you often filter out values you don’t need. But not all filters are created equal. You may want to exclude one value, keep a range of values, keep things that match a pattern, or filter a range of specific values. All this can be done with calculations, but writing them can be cumbersome.
Tableau Prep Builder makes the filtering experience simple and direct. Our built-in rich filtering capabilities follow the same flexible, easy-to-use mantra that exists with the filtering capabilities in Tableau Desktop. If you know how to use a filter in Tableau Desktop, then filtering in Tableau Prep Builder is even easier for you. In this blog, we’ve included some quick tips and tricks on how to leverage these rich filtering capabilities for your data prep needs.
One-click filtering to keep or exclude values
Have you ever had one or more values that you just knew didn’t belong in your data set? Perhaps you figured out that a value is an outlier…or maybe the range of dates represented are irrelevant for the analysis you’re trying to do. Tableau Prep Builder makes this easy–if you can see it, you can fix it. If you see a value that you want to want to exclude, simply right-click on the value and select ‘Exclude’. You can also choose to ‘Keep only’ the value that you’ve selected from this same menu.
Multi-select filtering to keep or exclude your categorical values
Most data sets have categorical fields. For example, sales opportunity data sets might have a field that tracks the type of opportunity. If you are cleaning survey data, maybe you have a field with country or region-level values.
When you are preparing your data for analysis, there are instances when you might want to look at data pertaining to a particular category. The selected values filters in Tableau Prep Builder are for these types of scenarios. For example, a researcher focused on a region of the world, say, the Middle East and Europe, might want to filter out all other parts of the world when they are preparing survey data.
Putting this filter to use is super easy. Go to the More Options ‘…’ menu on your profile card and inside the ‘Filters’ submenu, choose ‘Selected Values’. From there, you can select one or more values to include or exclude them from your data set.
Filter your data to a specific range of values and dates
Date and quantitative values show up in messy data all the time. Extending our sales opportunity example from earlier...you may want to filter out opportunities that aren’t within a certain range. Maybe you also want to only see opportunities that were introduced into your data set within a certain period of time.
Any time you want to specify a range for your quantitative values or dates, you can use one of the built-in value filters in Tableau Prep Builder. Simply go to the More Options ‘…’ menu on your profile card and select ‘Range of Values’ or ‘Range of Dates’ and specify your minimum and maximum range.
Range of Date filters aren’t the only type of date filters supported in Tableau Prep Builder. As you’re preparing your data, imagine you want to only see sales opportunities for the last 12 months. You could write a calculation that would look something like this:
IF DATEDIFF('month', [Opportunity Date], today())
THEN [Opportunity Date] END
THEN [Opportunity Date]
Or, to make things easy, you can also use a Relative Date filter to specify the exact range of years, quarters, months, weeks, or days that you want to see in your data.
Filter values that don’t match a pattern
All these filtering capabilities are great, but what if you’re trying to filter out values that don’t match a certain pattern? Maybe you have a field with email addresses and you only want to see email addresses associated with a specific organization. Our wildcard match filter is perfect for these types of scenarios. Simply select ‘Wildcard Match’ from the More Options ‘...’, type in your string, and select a match option.
Learn more about filtering in Tableau Prep Builder
Whether you’re dealing with numeric values, dates, or strings, filtering in Tableau Prep Builder is there to make you successful. For even more flexibility, you can also leverage filter calculations.
Learn more about filtering in Tableau Prep Builder and download the newest version of Tableau Prep Builder today.