Bird
Raised Fist0
Tableaubi_tool~15 mins

Creating bins in Tableau - Business Scenario Walkthrough

Choose your learning style10 modes available
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants to understand how sales amounts are distributed by grouping sales into ranges (bins).
📊 Data: You have sales transaction data with columns: Transaction ID, Product, Sales Amount, and Date.
🎯 Deliverable: Create a dashboard showing the count of transactions grouped into sales amount bins of $50 each.
Progress0 / 6 steps
Sample Data
Transaction IDProductSales AmountDate
1001Shirt452024-05-01
1002Jeans1202024-05-02
1003Shoes752024-05-02
1004Hat302024-05-03
1005Jacket2002024-05-04
1006Socks152024-05-04
1007Shirt552024-05-05
1008Jeans1302024-05-05
1009Shoes902024-05-06
1010Hat402024-05-06
1
Step 1: Connect your sales data to Tableau and open a new worksheet.
No formula needed.
Expected Result
Sales data is loaded and visible in Tableau's data pane.
2
Step 2: Create a bin for Sales Amount with a size of 50.
Right-click 'Sales Amount' in data pane > Create > Bins... > Set bin size to 50 > Click OK.
Expected Result
A new field 'Sales Amount (bin)' appears in the data pane.
3
Step 3: Drag 'Sales Amount (bin)' to Rows shelf.
No formula needed.
Expected Result
Rows are grouped by sales amount bins of $50 ranges.
4
Step 4: Drag 'Number of Records' to Columns shelf to count transactions per bin.
No formula needed.
Expected Result
Bar chart shows count of transactions in each sales amount bin.
5
Step 5: Format the chart with clear axis titles and add a chart title 'Transaction Count by Sales Amount Bins'.
No formula needed.
Expected Result
Chart is easy to read with descriptive titles.
6
Step 6: Add the chart to a dashboard and publish or share with your manager.
No formula needed.
Expected Result
Dashboard shows sales distribution grouped by $50 bins.
Final Result
Sales Amount Bins (Rows) | Number of Transactions (Columns)
---------------------------------------------------------
  $0 - $49             | ████████ (4)
  $50 - $99            | ██████ (3)
  $100 - $149          | ██ (2)
  $150 - $199          |  (0)
  $200 - $249          | █ (1)

Bar chart with bins on vertical axis and count on horizontal axis.
✓Most transactions fall in the $0-$49 and $50-$99 sales amount bins.
✓There are fewer transactions with sales amounts above $100.
✓The highest sales bin ($200-$249) has only one transaction.
Bonus Challenge

Create dynamic bins where the bin size can be changed by the user using a parameter control.

Show Hint
Create a parameter for bin size, then create a calculated field using FLOOR([Sales Amount]/[Bin Size Parameter])*[Bin Size Parameter] to define bins dynamically.

Practice

(1/5)
1. What is the main purpose of creating bins in Tableau?
easy
A. To create calculated fields for text data
B. To join two tables based on a key
C. To filter out null values from a dataset
D. To group continuous numeric data into ranges for easier analysis

Solution

  1. Step 1: Understand what bins do in Tableau

    Bins group continuous numeric data into ranges or intervals to simplify analysis.
  2. Step 2: Compare options to the bin concept

    Only To group continuous numeric data into ranges for easier analysis describes grouping numeric data into ranges, which matches bins' purpose.
  3. Final Answer:

    To group continuous numeric data into ranges for easier analysis -> Option D
  4. Quick Check:

    Bins = Group numeric data into ranges [OK]
Hint: Bins group numbers into ranges for simpler analysis [OK]
Common Mistakes:
  • Confusing bins with filters
  • Thinking bins apply to text data
  • Assuming bins join tables
2. Which of the following is the correct way to create bins in Tableau?
easy
A. Right-click a numeric field and select 'Create > Bins'
B. Drag a dimension to the Columns shelf and select 'Create > Bins'
C. Right-click a text field and select 'Create > Bins'
D. Use the Data menu and select 'Create > Calculated Field'

Solution

  1. Step 1: Recall the bin creation method in Tableau

    You create bins by right-clicking a numeric field and choosing 'Create > Bins'.
  2. Step 2: Check each option against this method

    Only Right-click a numeric field and select 'Create > Bins' matches the correct method; others either use wrong field types or wrong menu options.
  3. Final Answer:

    Right-click a numeric field and select 'Create > Bins' -> Option A
  4. Quick Check:

    Create bins = Right-click numeric field > Create > Bins [OK]
Hint: Bins come from right-clicking numeric fields, not text [OK]
Common Mistakes:
  • Trying to create bins from text fields
  • Using the Data menu instead of field context menu
  • Dragging dimensions instead of numeric fields
3. Given a numeric field 'Sales' with values from 0 to 1000, if you create bins with a size of 200, how many bins will Tableau create?
medium
A. 4
B. 6
C. 5
D. 10

Solution

  1. Step 1: Calculate the number of bins using Tableau's formula

    Number of bins = floor(1000 / 200) - floor(0 / 200) + 1 = 5 - 0 + 1 = 6 bins.
  2. Step 2: Confirm Tableau binning

    Tableau uses floor(value / size) * size for bin start: bins at 0, 200, 400, 600, 800 covering 0-200, 200-400, 400-600, 600-800, 800-1000.
  3. Step 3: Correct the calculation

    Since max value is 1000 and bin size is 200, bins start at 0, 200, 400, 600, 800 covering up to 1000, so total bins = 5.
  4. Final Answer:

    5 -> Option C
  5. Quick Check:

    floor(1000/200) - floor(0/200) + 1 = 6 but last bin covers 1000-1200 which is beyond max, Tableau creates 5 bins covering data [OK]
Hint: floor(max/size) - floor(min/size) + 1 usually, but check max coverage [OK]
Common Mistakes:
  • Calculating range / size = 5 without endpoint adjustment
  • Confusing bin size with number of bins
  • Assuming bins start at 1 instead of 0
4. You created bins on a numeric field but Tableau shows an error: 'Cannot create bins on this field.' What is the most likely cause?
medium
A. The field is a string or non-numeric data type
B. The data source is not connected
C. The bin size is set to zero
D. The field is a dimension, not a measure

Solution

  1. Step 1: Understand bin creation requirements

    Bins can only be created on numeric fields. If the field is string or non-numeric, Tableau cannot create bins.
  2. Step 2: Analyze error causes

    The field is a string or non-numeric data type matches the cause: field is non-numeric. Other options are less likely or unrelated to this error.
  3. Final Answer:

    The field is a string or non-numeric data type -> Option A
  4. Quick Check:

    Bins need numeric fields, non-numeric causes error [OK]
Hint: Bins require numeric fields; strings cause errors [OK]
Common Mistakes:
  • Trying to create bins on text fields
  • Assuming bin size zero causes this error
  • Ignoring data source connection issues
5. You want to analyze customer ages grouped in 10-year ranges using bins. The 'Age' field ranges from 18 to 72. Which bin size should you choose to create exactly 6 bins covering all ages?
hard
A. 9
B. 11
C. 13
D. 10

Solution

  1. Step 1: Recall Tableau's bin count formula

    Number of bins = floor(72 / size) - floor(18 / size) + 1. Need this = 6.
  2. Step 2: Test options

    A 11: floor(72/11)=6, floor(18/11)=1 -> 6-1+1=6 [check]
    B 9: floor(72/9)=8, floor(18/9)=2 -> 8-2+1=7 ✗
    C 13: floor(72/13)=5, floor(18/13)=1 -> 5-1+1=5 ✗
    D 10: floor(72/10)=7, floor(18/10)=1 -> 7-1+1=7 ✗
  3. Final Answer:

    11 -> Option B
  4. Quick Check:

    floor(72/11)-floor(18/11)+1=6 [OK]
Hint: Divide range by bins, round up to cover all data [OK]
Common Mistakes:
  • Choosing bin size equal to exact range divided by bins without rounding
  • Ignoring that bins must cover entire range
  • Assuming 10-year bins always create 6 bins regardless of range
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard