How to create a custom tooltip in Power BI
A custom tooltip in Power BI replaces the small text box that appears on hover with a real mini report page, complete with KPIs, charts and context. It is the cheapest way to give users detail without cluttering the main page with visuals.
Prerequisites
- Power BI Desktop installed and up to date.
- A simple model with a fact table (for example
Vendas) related to a date table (Calendário). - At least one visual on the main page, such as a bar chart of sales by category.
Step 1: Create the measures that will appear in the tooltip
A custom tooltip in Power BI is only useful if it shows numbers the main visual does not. Start by creating two or three supporting measures under Modeling > New measure.
Vendas Totais = SUM ( Vendas[Valor] )
Vendas Ano Anterior =
CALCULATE (
[Vendas Totais],
SAMEPERIODLASTYEAR ( Calendário[Data] )
)
Variação % =
DIVIDE (
[Vendas Totais] - [Vendas Ano Anterior],
[Vendas Ano Anterior]
)
These three measures are enough for a tooltip that answers a simple question: how much did we sell, how much did we sell last year, and are we growing?
Step 2: Create the page that will act as the tooltip
At the bottom of the screen, click the + sign to add a new page and rename it to something clear, such as TT Vendas. Using a TT prefix makes it easy to tell tooltip pages apart from regular report pages.
Step 3: Set the page size
With the new page selected and no visual active, open the Format pane and go to Canvas settings. Under Type, choose Tooltip. Power BI resizes the canvas to 320 x 240 pixels, the size designed to sit next to the cursor.
If you need more room, pick Custom and set, for example, 400 x 300. Do not overdo it: a large tooltip hides the very visual the user is analysing.
Step 4: Enable the page as a tooltip
Still in the page Format pane, open Page information and turn on Allow use as tooltip. Without this step the page will not show up in the list of available tooltips — it is the most common error for first-timers.
While you are there, hide the page from the navigation tabs: right-click the page name and choose Hide page, so users do not open it by accident.
Step 5: Design the tooltip content
Now lay out the information. A good recipe, within 320 x 240, is:
- Two cards (the Card visual) showing
[Vendas Totais]and[Variação %]. - A small line chart with
[Vendas Totais]by month, to give the trend. - A text box with a short title, such as Category detail.
Less is more: two or three visuals can be read in a second; five visuals make the tooltip unreadable. Turn off axes, legends and borders that add nothing.
Step 6: Connect the tooltip to the visual
Go back to the main page and select the bar chart. In the Format visual pane, go to General > Tooltips and change the Type from Default to Report page. Under Page, choose TT Vendas.
If you want the tooltip to work with a field that is not in the visual (for example, showing detail by Country on a Category chart), drag that field into the Tooltip fields well of the tooltip page.
Verify the result
Hover over a bar in the chart. Your page should appear instead of the usual text box, and the values should change with each bar: hovering over Bikes, the cards show the numbers for bikes. If you always see the same value, filter context is not flowing through — check that the tooltip visuals use measures (not fixed values) and that the page has no page-level filter pinned to a single value.
If the tooltip does not appear at all, revisit Step 4: almost always the Allow use as tooltip toggle was left off.
Conclusion
In six steps you have a tooltip that explains the "why" behind every bar, without spending a single centimetre of the main page. The natural next step is to build different tooltips for different visuals — one for sales, another for margin — and reuse them across reports. How about trying a sparkline inside it to show the last 12 months?