0
0
Tableaubi_tool~15 mins

Creating calculated fields in Tableau - Business Scenario Walkthrough

Choose your learning style9 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants you to analyze profit margins by product category and region. They ask you to create calculated fields to find the profit margin percentage and then build a summary report.
📊 Data: You have sales data including Product Category, Region, Sales Amount, and Profit Amount for each transaction.
🎯 Deliverable: Create calculated fields for Profit Margin Percentage and build a summary table showing average profit margin by Product Category and Region.
Progress0 / 5 steps
Sample Data
Product CategoryRegionSales AmountProfit Amount
ElectronicsNorth1000200
ElectronicsSouth1500300
FurnitureNorth800160
FurnitureSouth1200240
ClothingNorth70070
ClothingSouth90090
ElectronicsEast1100220
FurnitureEast950190
ClothingEast60060
1
Step 1: Open Tableau and connect to the sales data source.
No formula needed.
Expected Result
Data is loaded and visible in Tableau's Data pane.
2
Step 2: Create a calculated field named 'Profit Margin %'.
[Profit Amount] / [Sales Amount] * 100
Expected Result
A new field 'Profit Margin %' appears in the Data pane.
3
Step 3: Build a summary table: Drag 'Product Category' to Rows, 'Region' to Columns.
No formula needed.
Expected Result
Rows show product categories, columns show regions.
4
Step 4: Drag the 'Profit Margin %' calculated field to the Text mark to show average profit margin.
Aggregation: AVG([Profit Margin %])
Expected Result
Table cells display average profit margin percentages by category and region.
5
Step 5: Format the 'Profit Margin %' values to show one decimal place and add a % sign.
Format numbers as Percentage with 1 decimal place.
Expected Result
Profit margin values display as percentages, e.g., 20.0%.
Final Result
-------------------------------------------------
| Product Category | North  | South  | East  |
-------------------------------------------------
| Electronics      | 20.0%  | 20.0%  | 20.0% |
| Furniture        | 20.0%  | 20.0%  | 20.0% |
| Clothing         | 10.0%  | 10.0%  | 10.0% |
-------------------------------------------------
Electronics and Furniture have a consistent profit margin of 20% across all regions.
Clothing has a lower profit margin of 10% in all regions.
Profit margins are stable and do not vary by region for these categories.
Bonus Challenge

Create a calculated field that categorizes profit margin into 'High' if above 15%, 'Medium' if between 10% and 15%, and 'Low' if below 10%. Then, build a color-coded heatmap by Product Category and Region using this classification.

Show Hint
Use an IF or CASE statement in the calculated field to assign categories based on [Profit Margin %]. Then use color marks in Tableau to visualize.