0
0
Tableaubi_tool~15 mins

Parameter in calculated fields 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 flexible sales report where they can choose a sales target and see which products meet or exceed that target.
📊 Data: You have sales data with columns: Product Name, Sales Amount, and Region.
🎯 Deliverable: Create a Tableau dashboard with a parameter to select a sales target and a calculated field that flags products meeting or exceeding that target. Show a bar chart of products colored by this flag.
Progress0 / 5 steps
Sample Data
Product NameSales AmountRegion
Alpha1200North
Beta800South
Gamma1500East
Delta700West
Epsilon1300North
Zeta900South
Eta1600East
Theta600West
1
Step 1: Create a parameter named 'Sales Target' with data type Integer, allowable values from 500 to 2000, step size 100, and default value 1000.
In Tableau, right-click in Data pane > Create Parameter > Name: Sales Target > Data type: Integer > Current value: 1000 > Range: 500 to 2000, step 100
Expected Result
A parameter 'Sales Target' appears in the Data pane with default 1000.
2
Step 2: Create a calculated field named 'Meets Target' that checks if Sales Amount is greater than or equal to the 'Sales Target' parameter.
IF SUM([Sales Amount]) >= [Sales Target] THEN 'Yes' ELSE 'No' END
Expected Result
Calculated field 'Meets Target' returns 'Yes' for products with sales >= selected target, otherwise 'No'.
3
Step 3: Build a bar chart with 'Product Name' on Rows and SUM of 'Sales Amount' on Columns.
Drag 'Product Name' to Rows, drag 'Sales Amount' to Columns, aggregation SUM.
Expected Result
Bar chart shows total sales per product.
4
Step 4: Drag the 'Meets Target' calculated field to Color on the Marks card to color bars by whether they meet the target.
Drag 'Meets Target' to Color shelf.
Expected Result
Bars are colored differently for 'Yes' and 'No' values.
5
Step 5: Show the 'Sales Target' parameter control on the dashboard for user interaction.
Right-click 'Sales Target' parameter > Show Parameter Control.
Expected Result
Parameter control appears allowing the manager to select different sales targets.
Final Result
Product Sales Meeting Target

Product Name | Sales Amount | Meets Target
------------------------------------------
Alpha        | 1200         | Yes
Beta         | 800          | No
Gamma        | 1500         | Yes
Delta        | 700          | No
Epsilon      | 1300         | Yes
Zeta         | 900          | No
Eta          | 1600         | Yes
Theta        | 600          | No

Bar chart with products on vertical axis, sales amount on horizontal axis,
bars colored green for 'Yes' and red for 'No'. Parameter control above to select sales target.
Products Alpha, Gamma, Epsilon, and Eta meet or exceed the default sales target of 1000.
Products Beta, Delta, Zeta, and Theta do not meet the target.
Changing the sales target parameter updates the chart colors dynamically.
Bonus Challenge

Add a filter to show only products that meet the selected sales target.

Show Hint
Create a filter using the 'Meets Target' calculated field and set it to show only 'Yes'.