0
0
Tableaubi_tool~8 mins

Parameter in calculated fields in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Parameter in calculated fields
Business Question

How can we use a parameter to dynamically change the sales target and see which products meet or exceed this target?

Sample Data
ProductCategorySales
ChairFurniture250
DeskFurniture450
PenOffice Supplies150
NotebookOffice Supplies300
PhoneTechnology600
MonitorTechnology400
Dashboard Components
  • KPI Card: Average Sales
    Formula: AVG([Sales])
    Result: 358.33
  • Parameter: Sales Target
    Type: Integer
    Current Value: 400
    Allows user to set a sales target dynamically
  • Calculated Field: Meets Target
    Formula:
    IF [Sales] >= [Sales Target] THEN 'Yes' ELSE 'No' END
    This field marks products that meet or exceed the target
  • Bar Chart: Sales by Product
    X-axis: Product
    Y-axis: Sales
    Color: Meets Target (Yes=green, No=red)
    Shows which products meet the dynamic sales target
  • Table: Product Sales and Target Status
    Columns: Product, Sales, Meets Target
    Shows detailed data with dynamic target status
Dashboard Layout
+----------------------+----------------------+
|      KPI Card        |    Sales Target      |
|   (Average Sales)    |    (Parameter)       |
+----------------------+----------------------+
|                                              |
|              Bar Chart: Sales by Product      |
|                                              |
+----------------------------------------------+
|        Table: Product Sales and Target Status |
+----------------------------------------------+
Interactivity

The Sales Target parameter lets users change the sales goal number. When the parameter changes:

  • The Calculated Field 'Meets Target' updates for each product.
  • The Bar Chart colors update to show which products meet the new target.
  • The Table updates the 'Meets Target' column accordingly.
  • The KPI Card (Average Sales) remains static as it shows overall average sales.
Self Check

If you set the Sales Target parameter to 300, which products will show 'Yes' in the 'Meets Target' column?

Answer: Desk (450), Notebook (300), Phone (600), Monitor (400) will show 'Yes'. Chair (250) and Pen (150) will show 'No'.

Key Result
Dashboard shows sales by product with a dynamic sales target parameter highlighting which products meet or exceed the target.