KNOWLEDGE BASE

How to Filter Hierarchical Views


Published: 03 Mar 2023
Last Modified Date: 03 Mar 2023

Question

Is there a way to apply filters step by step when views that display the sales of each hierarchical field are placed on the dashboard?

User-added image

Environment

  • Tableau Desktop

Answer

Below is an example of filtering the sales of the country, region, and state step by step using Sample - Superstore data.

User-added image

1. Right-click Country/Region and select Create > Set. Unselect all values. Name it !Country Set.
2. Create a calculated field and name it !Region.
IF [!Country Set] THEN [Region] END
3. Right-click !Region and select Create > Set. Unselect all values.
4. Create a calculated field and name it !State.
IF [!Region Set] THEN [State/Province] END
5. Open a new worksheet and add YEAR(Order Date) to Columns, Country/Region to Rows, and SUM(Sales) to Text. Name the worksheet Sales by Country.
6. Open a new worksheet and add YEAR(Order Date) to Columns, !Region to Rows, and SUM(Sales) to Text. Name the worksheet Sales by Region.
7. Add !Region to Filters and configure it as follows:
 User-added image
8. Open a new worksheet and add YEAR(Order Date) to Columns, !State to Rows, and SUM(Sales) to Text. Name the worksheet Sales by State.
9. Add !State to Filters and configure it as follows:
 User-added image
10. Open a new dashboard and add all Sheets.
11. Select Menu > Dashboard > Actions > Change Set Values. Configure it as follows:
 User-added image
 User-added image
12. Select Menu > Dashboard > Actions > Filter. Configure it as follows:
 User-added image
Did this article resolve the issue?