Interlude – context filtering

You may have noticed that when you use the drop-down filter to select a single Department or select a single category, you have fewer than 10 items in the Top 10 view. For example, selecting Furniture from the Department filter and clicking on the bar for Tables results in only three items being shown. This is because the Top Item filter is evaluated at the same time as the action filter. There are only three items with the category of Tables that are also in the Top 10.

What if you want to see the top 10 items within the category of Tables? You can accomplish this using context filters.

Context filters are a special kind of filter in Tableau that are applied before other filters. Other filters are then applied within the context of the context filters. Conceptually, context filters result in a subset of data upon which other filters and calculations operate. In addition to Top Filters, Computed Sets and Fixed Level of Detail calculations are also computed within the context defined by context filters.

In this case, navigate to the Top 10 sheet and add the Department filter and the newly added action (Category) filter to the context using the drop-down menu of the fields on the Filters shelf. Once added to the context, those fields will be gray on the filters shelf. Now, you will see the top 10 items within the context of the selected Department and Category:

Notice that adding filters to the context causes the fields to be color-coded gray on the Filters shelf.

If you edit the action on the dashboard, the filter might be automatically updated and you may have to re-add it to the context.

Go ahead and step through the actions by selecting a couple of different categories and a couple of different items. Observe how the final dashboard meets your objectives by telling a story:

The user has selected Technology from the Department drop-down, Telephones and Communications from the category list, and then Item 10631, which is the least profitable item within the category. This reveals the states where the item was sold (color-coded by profit) and a time series of profit for the item.

Should management remove item 10631 from the inventory? Not without first considering that the item only lost profit in one instance and that the trend is positive toward greater profitability. Granted, the original loss was a large loss, but this was also a long time ago and every subsequent sale of the item resulted in gain. The results of your findings may lead to further analysis to determine what factors play a part in the profit and loss for the item and better decision making by management.

When you look at the Chapter 07 Completed workbook, you'll only see a tab at the bottom for the dashboard. The individual views have been hidden. Hiding tabs for sheets that are used in dashboards or stories is a great way to keep your workbook clean and guide your audience away from looking at sheets that are meant to be seen in the context of a dashboard or story. To hide a sheet, right-click the tab and select Hide Sheet. To unhide a sheet, navigate to the dashboard or story using the sheet, right-click the sheet in the left-hand side pane, and uncheck Hide Sheet. Additionally, you can hide or unhide all sheets that are used in a dashboard by right-clicking the dashboard tab and selecting the appropriate option. Sheets that are used in tooltips may be hidden or unhidden in the same way.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.172.56