Last Modified Date: 03 Mar 2023
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.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] END3. 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] END5. 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:
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:
10. Open a new dashboard and add all Sheets.
11. Select Menu > Dashboard > Actions > Change Set Values. Configure it as follows:
12. Select Menu > Dashboard > Actions > Filter. Configure it as follows:
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials