Bird
Raised Fist0
Tableaubi_tool~10 mins

Tooltip customization in Tableau - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to insert a field value into the tooltip.

Tableau
<Tooltip>
  <p>Sales: [1]</p>
</Tooltip>
Drag options to blanks, or click blank then click option'
ASUM(Sales)
BAGG(Sales)
CSUM([Sales])
D[Sales]
Attempts:
3 left
💡 Hint
Common Mistakes
Using angle brackets incorrectly
Omitting square brackets around field names
Using AGG instead of SUM
2fill in blank
medium

Complete the code to add a calculated field to the tooltip showing profit ratio.

Tableau
<Tooltip>
  <p>Profit Ratio: [1]</p>
</Tooltip>
Drag options to blanks, or click blank then click option'
AAVG([Profit]) / AVG([Sales])
BSUM([Profit]) / SUM([Sales])
C[Profit] / [Sales]
DSUM([Sales]) / SUM([Profit])
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing numerator and denominator
Using averages instead of sums
Not aggregating fields
3fill in blank
hard

Fix the error in the tooltip calculation to show average discount percentage.

Tableau
<Tooltip>
  <p>Avg Discount: [1]%</p>
</Tooltip>
Drag options to blanks, or click blank then click option'
ASUM([Discount%])
BSUM([Discount]) / COUNT([Discount]) * 100
CAVG([Discount%])
DAVG([Discount]) * 100
Attempts:
3 left
💡 Hint
Common Mistakes
Using SUM instead of AVG
Using a non-existent field with % in the name
Not multiplying by 100
4fill in blank
hard

Fill both blanks to create a tooltip that shows sales and profit with currency formatting.

Tableau
<Tooltip>
  <p>Sales: [1]</p>
  <p>Profit: [2]</p>
</Tooltip>
Drag options to blanks, or click blank then click option'
ASTR(SUM([Sales]))
BFORMAT(SUM([Profit]), '$#,##0')
CFORMAT(SUM([Sales]), '$#,##0')
DSTR(SUM([Profit]))
Attempts:
3 left
💡 Hint
Common Mistakes
Using STR instead of FORMAT
Formatting only one field
Omitting currency symbol
5fill in blank
hard

Fill all three blanks to create a tooltip showing category, total sales, and average profit margin.

Tableau
<Tooltip>
  <p>Category: [1]</p>
  <p>Total Sales: [2]</p>
  <p>Avg Profit Margin: [3]%</p>
</Tooltip>
Drag options to blanks, or click blank then click option'
A[Category]
BSUM([Sales])
CAVG([Profit Margin])
DCOUNT([Category])
Attempts:
3 left
💡 Hint
Common Mistakes
Using COUNT for category
Not aggregating sales or profit margin
Using wrong field names

Practice

(1/5)
1. What is the main purpose of customizing tooltips in Tableau dashboards?
easy
A. To export data to Excel
B. To change the color of the chart elements
C. To filter data automatically
D. To provide additional information when users hover over a visual

Solution

  1. Step 1: Understand tooltip functionality

    Tooltips appear when hovering over visuals to show extra details.
  2. Step 2: Identify customization purpose

    Customizing tooltips helps add meaningful info to improve user understanding.
  3. Final Answer:

    To provide additional information when users hover over a visual -> Option D
  4. Quick Check:

    Tooltip purpose = extra info on hover [OK]
Hint: Tooltips show info on hover, not change colors or export [OK]
Common Mistakes:
  • Confusing tooltips with chart color settings
  • Thinking tooltips filter data automatically
  • Assuming tooltips export data
2. Which of the following is the correct way to insert a field value into a tooltip in Tableau?
easy
A. Type the field name directly without brackets
B. Insert the field using <<Field Name>> syntax
C. Use <Field Name> tags
D. Use double quotes around the field name

Solution

  1. Step 1: Recall Tableau tooltip syntax

    Tableau uses double angle brackets to insert fields in tooltips.
  2. Step 2: Match syntax to options

    Only <<Field Name>> matches Tableau's field insertion style.
  3. Final Answer:

    Insert the field using <<Field Name>> syntax -> Option B
  4. Quick Check:

    Field insertion = <<Field Name>> [OK]
Hint: Use double angle brackets <<Field>> to insert fields in tooltips [OK]
Common Mistakes:
  • Typing field names without brackets
  • Using HTML tags instead of Tableau syntax
  • Putting field names in quotes
3. Given this tooltip text in Tableau:
Sales: <<SUM(Sales)>>
Region: <<Region>>

What will the tooltip show when hovering over a mark with Sales = 5000 and Region = 'West'?
medium
A. Sales: SUM(Sales)\nRegion: Region
B. Sales: <<SUM(Sales)>>\nRegion: <<Region>>
C. Sales: 5000\nRegion: West
D. Sales: 5000 Region: West

Solution

  1. Step 1: Understand field insertion in tooltip

    Tableau replaces <<SUM(Sales)>> with the sum value and <<Region>> with the region name.
  2. Step 2: Interpret line breaks and values

    \n creates a new line, so values appear on separate lines with actual data.
  3. Final Answer:

    Sales: 5000\nRegion: West -> Option C
  4. Quick Check:

    Tooltip shows actual values with line breaks [OK]
Hint: <<Field>> shows actual data; \n creates new line in tooltip [OK]
Common Mistakes:
  • Thinking <<Field>> stays as text
  • Ignoring line breaks in tooltip
  • Confusing field names with values
4. You customized a tooltip but it shows the literal text <<Profit>> instead of the profit value. What is the most likely cause?
medium
A. The field name is misspelled or does not exist
B. You forgot to add a line break
C. The tooltip is disabled in the worksheet
D. You used single angle brackets instead of double

Solution

  1. Step 1: Check field name correctness

    If Tableau shows <<Profit>> literally, it means it cannot find the field to replace.
  2. Step 2: Rule out other causes

    Line breaks or tooltip enablement do not cause literal text display; wrong brackets cause syntax errors.
  3. Final Answer:

    The field name is misspelled or does not exist -> Option A
  4. Quick Check:

    Literal <<Field>> means field missing or misspelled [OK]
Hint: Check field spelling if tooltip shows <<Field>> literally [OK]
Common Mistakes:
  • Assuming line breaks cause literal text
  • Thinking tooltip must be enabled to show fields
  • Using single < > instead of << >>
5. You want to create a tooltip that shows the product name, sales amount formatted as currency, and a custom message on separate lines. Which tooltip text will achieve this correctly in Tableau?
hard
A. Product: <<Product Name>>\nSales: $<<SUM(Sales)>>\nThank you for your interest!
B. Product: <<Product Name>>
Sales: $<<SUM(Sales)>>
Thank you for your interest!
C. Product: <<Product Name>> Sales: <<SUM(Sales, '$')>> Thank you for your interest!
D. Product: <<Product Name>> Sales: $<<SUM(Sales)>> Thank you for your interest!

Solution

  1. Step 1: Use correct line break syntax

    Tableau tooltips use \n (backslash n) for line breaks, not HTML <br> tags or literal \n in text.
  2. Step 2: Format sales as currency

    Prepending $ before <<SUM(Sales)>> formats sales as currency in tooltip text.
  3. Step 3: Verify custom message placement

    Custom text can be added as plain text on its own line.
  4. Final Answer:

    Product: <<Product Name>>\nSales: $<<SUM(Sales)>>\nThank you for your interest! -> Option A
  5. Quick Check:

    Use \n for lines and $ before sum for currency [OK]
Hint: Use \n for new lines and $ before <> for currency [OK]
Common Mistakes:
  • Using HTML
    tags inside tooltip text
  • Trying to format currency inside <>
  • Using literal \n instead of escape sequence
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