Sub topic 12
Designing effective tooltips
This chapter assumes you can already build a report page tooltip, use the Tooltips field well, and write basic DAX measures such as CALCULATE with a time-intelligence filter. Here the focus is design: what a tooltip should contain, how to size it, and how to keep it correct as the reader hovers over different data points.
What a tooltip is for
A tooltip answers one question about the data point under the cursor. The reader has already seen the headline number in the visual. The tooltip adds context so they do not have to leave the page.
Good tooltips usually do one of these jobs:
- Compare the value with a benchmark, such as the same period last year or a target.
- Show the composition of the value, such as the product mix behind a category total.
- Show a trend for the hovered item, such as a small line chart of monthly sales.
- Show identifying detail that does not fit on the axis, such as the customer's region or account owner.
If a tooltip needs a long explanation, the content belongs on a drill-through page. A tooltip disappears when the pointer moves, so the reader cannot scroll it, click it, or compare it with something else.
Choose content with filter context in mind
A report page tooltip receives the filter context of the hovered data point. If the reader hovers over the "Bikes" bar in a chart of sales by category, every visual on the tooltip page is filtered to Category = Bikes. This is why a tooltip visual should not repeat the category on its axis. Show something that varies by a different field, such as month or region, so the filter produces a useful breakdown.
The tooltip page also inherits the filters that already apply to the source visual. This includes slicers, page filters, and cross-filtering from other visuals. A tooltip therefore stays consistent with the report the reader is looking at, but you should test it with several slicer selections.
Use measures that adapt
A tooltip is reused for many data points, so its measures must behave sensibly for each one. The measures from the Topic Spine for this tutorial are a good starting set.
Sales PY =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Sales YoY % =
DIVIDE ( [Total Sales] - [Sales PY], [Sales PY] )DIVIDE returns blank when the denominator is zero or blank. That matters for tooltips because a new product has no prior-year sales. A blank is better than an error, and a card showing a blank is easy to read as "no comparison available".
SAMEPERIODLASTYEAR needs a contiguous date column from a proper date table. If the visual's axis is not a date, the measure still works because it reads the date filter from the filter context. If no date filter is present at all, the measure compares the full range of dates in the model with the prior year of that range, and the result may not mean what you expect. Check this on the tooltip page with a card.
Label what the reader is seeing
When the same tooltip serves a hierarchy, the hovered item may be a category, a subcategory, or a product. A measure that uses ISINSCOPE can build a heading that says which level the reader is looking at.
Level Label =
IF (
ISINSCOPE ( Product[Product Name] ), "Product",
IF (
ISINSCOPE ( Product[Subcategory] ), "Subcategory",
IF ( ISINSCOPE ( Product[Category] ), "Category", "Total" )
)
)Place this in a card or a text-box title on the tooltip page. After the reader drills down, the tooltip heading changes with the level and no separate tooltip is needed.
A second pattern is a title that names the hovered item. SELECTEDVALUE returns the value when exactly one is in filter context, and a fallback otherwise.
Tooltip Title =
SELECTEDVALUE ( Product[Category], "Multiple categories" )The fallback text appears when the reader hovers over a total or a visual that groups by something other than category. Choose fallback text that reads naturally in those cases.
Size and layout
The tooltip page is a normal report page with a special page type, so its canvas size decides how large the pop-up is.
- In the page's Format pane, open Page information and turn on Allow use as tooltip.
- Under Canvas settings, choose Tooltip as the type. This gives a small canvas of 320 by 240 pixels.
- Set the view to Actual size so you design at the real scale.
- Leave generous padding. Power BI crops content that falls outside the canvas.
Use these layout rules:
- Two or three visuals at most. More than that is hard to read in the second or two a reader spends on a tooltip.
- Put the most important number at the top, in a card with a large font.
- Use compact formats such as
0.0%and thousands (K) or millions (M) display units. - Remove axis titles and gridlines that add no information. Keep data labels on small visuals so the reader does not need to hover again.
- Hide the tooltip page from the page tabs so readers do not land on it. A hidden page still works as a tooltip.
You can choose a larger size by selecting a custom canvas, but a large tooltip covers the data the reader is trying to inspect. Keep it small unless the content needs the room.
Assign the tooltip to a visual
On the source visual, open Format, then General, then Tooltips. Set the type to Report page and choose the tooltip page. If Auto is selected, Power BI picks a tooltip page whose tooltip fields match the fields in the visual. Choosing the page explicitly avoids surprises when you later add other tooltip pages.
You can also give a tooltip page its own Tooltip fields in the page settings. Power BI then uses that page for any visual that contains those fields, which is useful when many visuals show the same entity.
Default tooltips versus page tooltips
| Aspect | Default tooltip with Tooltips field well | Report page tooltip |
|---|---|---|
| Content | Text lines of field values and measures | Any visuals, text, and shapes |
| Setup effort | Drag fields into the Tooltips well | Build and size a separate page |
| Maintenance | Edited in one place | Needs checking when the model changes |
| Reader scan time | Very fast | Slightly longer |
| Best for | A few extra numbers | Trends, composition, or comparison visuals |
Start with the default tooltip. Move to a page tooltip when a chart would explain the point better than a list of numbers.
Accessibility and performance
Each hover on a visual runs the queries behind every visual on the tooltip page. A tooltip with heavy measures over a large model feels slow, and readers move on before it renders. Keep these points in mind:
- Prefer simple aggregations and measures that reuse existing ones.
- Avoid high-cardinality visuals such as a table of thousands of rows.
- Test on a published report, not only in Desktop, because the service adds network time.
- Hover tooltips do not work with a keyboard or touch in the same way. On touch devices, a tap shows the tooltip. For keyboard users, make sure the key numbers also appear in the main visual or in an accessible table, so no information is available only in a tooltip.
Common design problems
- The tooltip shows the same numbers for every point. The visuals on the tooltip page probably have no field in common with the source visual, so there is nothing to filter. Check that the tooltip visuals use measures and that the hovered field is part of the data model relationships.
- A card shows a blank. The hovered point has no data for that measure. Use
COALESCEor a fallback only if a zero is meaningful. A blank is often the honest answer. - The tooltip is cut off. The content is larger than the canvas. Reduce visual sizes or select a larger canvas.
- Totals look wrong. A measure written for a single item may behave differently at the total level. Test the tooltip on the total bar and on grand-total rows.
- The wrong page appears. The visual is set to Auto and more than one tooltip page matches. Select the page explicitly.
A short design workflow
Work through the loop at least once with real data before publishing. Most tooltip faults show up only when you hover over a total, an empty point, or a slicer-filtered view.
Exercise
A bar chart shows Sales by Category. Your tooltip page has a bar chart with Category on its axis and a card showing Sales YoY %. Readers say the tooltip chart always shows a single bar and adds nothing. Why does this happen, and what would you change?
Show answer
The tooltip page receives the hovered category as a filter, so the chart's Category axis is reduced to the one hovered category, giving a single bar. Change the axis to a field that varies within a category, such as Month or Subcategory, so the filter produces a breakdown of the hovered item. Keep the YoY card as the headline number.
Exercise
A tooltip shows "Product" when the reader hovers over a product bar but should show "Category" when they hover over a category bar. Which DAX function allows the label to change, and where would you place the measure?
Show answer
Use ISINSCOPE in a Level Label measure that checks Product Name, then Subcategory, then Category, and falls back to "Total". Place the measure in a card or a text-box title on the tooltip page so the heading follows the hierarchy level of the hovered point.