0
0
Tableaubi_tool~15 mins

Dynamic dimension swap in Tableau - Real Business Scenario

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a sales report where they can switch the view between sales by Region, Category, or Salesperson dynamically without creating multiple charts.
📊 Data: You have sales data including Date, Region, Category, Salesperson, and Sales Amount.
🎯 Deliverable: Create a Tableau dashboard with a single chart that changes its dimension based on a user selection parameter to show total sales by Region, Category, or Salesperson.
Progress0 / 5 steps
Sample Data
DateRegionCategorySalespersonSales Amount
2024-01-05NorthElectronicsAlice1200
2024-01-10SouthFurnitureBob850
2024-01-15EastElectronicsCharlie950
2024-01-20WestOffice SuppliesDiana400
2024-01-25NorthFurnitureAlice700
2024-02-01SouthElectronicsBob1100
2024-02-05EastOffice SuppliesCharlie300
2024-02-10WestFurnitureDiana650
2024-02-15NorthOffice SuppliesAlice500
2024-02-20SouthFurnitureBob900
1
Step 1: Create a parameter named 'Select Dimension' with string values: 'Region', 'Category', 'Salesperson'. Set default to 'Region'.
In Tableau, right-click in Data pane > Create Parameter > Name: Select Dimension > Data type: String > Allowable values: List > Add values: Region, Category, Salesperson > Set current value: Region
Expected Result
A parameter 'Select Dimension' appears allowing user to choose one of the three dimensions.
2
Step 2: Create a calculated field named 'Dynamic Dimension' that returns the field based on the parameter selection.
CASE [Select Dimension] WHEN 'Region' THEN [Region] WHEN 'Category' THEN [Category] WHEN 'Salesperson' THEN [Salesperson] END
Expected Result
A calculated field 'Dynamic Dimension' that changes its value based on the parameter.
3
Step 3: Build a bar chart with 'Dynamic Dimension' on Rows and SUM of 'Sales Amount' on Columns.
Rows: Dynamic Dimension Columns: SUM([Sales Amount]) Mark type: Bar
Expected Result
A bar chart showing total sales grouped by the selected dimension.
4
Step 4: Add the 'Select Dimension' parameter control to the dashboard for user interaction.
Right-click 'Select Dimension' parameter > Show Parameter Control
Expected Result
User can select 'Region', 'Category', or 'Salesperson' and the chart updates accordingly.
5
Step 5: Test the dashboard by switching the parameter values and verify the chart updates dynamically.
Select 'Category' in parameter > Chart updates to show sales by Category Select 'Salesperson' in parameter > Chart updates to show sales by Salesperson
Expected Result
Chart dynamically swaps dimension without needing multiple charts.
Final Result
Select Dimension: [Region | Category | Salesperson]

Dynamic Sales by Selected Dimension

| Dimension    | Total Sales |
|--------------|-------------|
| North        | 2400        |
| South        | 2850        |
| East         | 1250        |
| West         | 1050        |

(Bar chart bars proportional to sales values)
South region has the highest total sales among regions.
Furniture category is a strong performer when selected.
Salesperson Bob leads in total sales compared to others.
Bonus Challenge

Add a date filter to allow the manager to select a specific month or date range and see the dynamic dimension sales for that period.

Show Hint
Create a date parameter or use Tableau's date filter and apply it to the data source or worksheet to filter sales by the selected date range.