This example filters headers and color encodings in a bar
chart using the
Filter dialog box. To filter
the data, follow the steps below.
-
Create the initial view shown below. It was created
using the Superstore sample data source that comes with the product. The view shows the
profitability for three product departments broken down by their ship mode and container.
-
Create a basic filter on the Container dimension that excludes
the Small Pack and Wrap Bag shipping containers.
Drag the Container dimension
to the Filters shelf to open the Filter dialog
box. Click the None button at the bottom
of the list to deselect all of the shipping containers. Then select
the Exclude option in the lower right corner
of the dialog box. Finally, select Small Pack and Wrap
Bag. When finished click OK.
-
The view updates to only show orders that were not shipped
in a Small Pack or Wrap Bag.
-
Now let’s refine the filter on Container by adding a limit.
Right-click the Container field on the Filters shelf and select
Filter. The Filter dialog box opens again. Leave the selections as they
are.
-
Switch to the Top tab and select By Field. Select Top 3 from
first two drop-down lists. Then select Sales and SUM from the remaining
drop-down lists. When finished click OK.
The Top formula is computed
after the selections on the General tab, which mean first Tableau computes
all orders that were not shipped in Small Pack or Wrap Bag containers.
Then the view shows just the top 3 of those orders in terms of sales.
-
Now let’s add a new filter on Ship Mode to exclude orders
that were shipped via Regular Air.
Right-click the Regular Air row header and select Exclude. The Regular Air ship
mode is removed from the view.
-
Finally, let’s filter the Department dimension. Drag the
Department dimension to the Filters shelf.
-
In the Filter dialog box, clear the checkbox for Office Supplies.
The final view is shown below. Take a look at the
Filters shelf.
You can easily see that the view is filtered on three separate fields.
To determine which values have been excluded, open the
Filter dialog
box for each of these fields.
No comments:
Post a Comment