Sub topic 14
Cross-filtering, slicers, drill-down and tooltips
This chapter assumes you can build a basic report page in Power BI Desktop, that your model has related tables, and that you can write simple measures such as SUM. It covers the four interaction features that change which visual you pick: cross-filtering, slicers, drill-down and tooltips. Interactivity lets one visual answer several questions. It also adds ways for a report to confuse readers if you leave it unconfigured.
Why interactivity affects visual choice
A static page has to show everything at once. An interactive page can show a summary first and let the reader ask follow-up questions. This changes your decisions in three ways:
- A simple bar chart can replace a dense table, because the reader can click a bar to see the detail.
- A visual can stay at one level of detail, such as year, while a hierarchy lets the reader go deeper.
- A tooltip can carry secondary numbers, so the main visual stays uncluttered.
The cost is discoverability. Readers do not always know a bar is clickable. Plan for that with titles, a short instruction, or a bookmark-based reset button.
Cross-filtering and cross-highlighting
When you select a data point in one visual, Power BI applies that selection to other visuals on the page. Two behaviors exist:
- Cross-filtering removes data that does not match the selection. The other visuals recalculate and show only the matching rows.
- Cross-highlighting keeps the full bars or columns and darkens the matching portion. This shows the part against the whole.
Highlighting is the default for many visuals, such as bar and column charts. Filtering is the default for others, such as line charts.
Editing interactions
You control how visuals affect each other with Edit interactions.
- Select the visual that will act as the source.
- On the Format tab, choose Edit interactions.
- Above each other visual, choose Filter, Highlight or None.
Use None for a visual that should never change, such as a card showing the company total. Use Filter when a highlighted bar would be hard to read, for example on a line chart.
Selecting several points
Hold Ctrl and click to select several points. Click a selected point again, or click empty space in the visual, to clear the selection. Cross-filtering across a selection of several points combines them as "any of these".
Slicers
A slicer is a visual whose only job is to filter. Slicers suit fields where the reader picks from a known list or range. Match the slicer style to the field type from earlier chapters:
| Field type | Good slicer style | Notes |
|---|---|---|
| Categorical, few values | List or tile buttons | Tiles work well for 2 to 6 values |
| Categorical, many values | Dropdown, with search | Saves space on the page |
| Numeric | Between (range) | Reader sets a minimum and maximum |
| Date | Between, relative date, or relative time | Relative date gives "last 30 days" without edits |
| Hierarchy | Hierarchy slicer | Filters across levels such as Category and Subcategory |
Sync, scope and clutter
By default a slicer affects every visual on its page. Use Sync slicers (on the View tab) to carry one slicer across several pages, or to show it on one page while filtering another. Use Edit interactions to exclude visuals that should ignore it.
Keep these limits in mind:
- Too many slicers push the report area down and confuse the reader. Four or five is a practical ceiling for one page.
- A slicer on a high-cardinality field, such as customer name, is slow and hard to use. Use a dropdown with search, or a filter pane filter instead.
- Slicers narrow the data for every visual, so a "percent of total" measure that uses
ALLover a different table will behave differently from one that does not.
Slicers versus the Filters pane
Use a slicer when the reader should see and change the filter on the page. Use the Filters pane when the filter is a fixed rule for the report author, such as excluding test accounts, or when the reader rarely needs to change it. Filters on a visual, a page or all pages can sit in the pane without taking up canvas space.
Drill-down and hierarchies
A hierarchy lists fields from broad to narrow, such as Year, Quarter, Month, Day or Category, Subcategory, Product. Place the hierarchy, or several fields, in the X-axis or Legend field well of a visual. Power BI then offers drill buttons in the visual header.
| Control | What it does |
|---|---|
| Drill mode (single arrow) | A click on a data point goes down one level for that point |
| Drill up (up arrow) | Returns to the previous level |
| Go to next level (double arrow) | Moves the whole visual down one level |
| Expand all (forked arrow) | Shows all levels together on the axis, such as Year and Quarter labels |
Drill-down compared with drill-through
Drill-down stays within one visual. Drill-through sends the reader to a different page that is filtered by the selected item. Choose drill-down for "show me the next level of the same measure". Choose drill-through for "show me everything about this one product", where the detail page has its own visuals.
Choosing visuals that drill well
Drill works best with bar, column, line and area charts, where the axis is categorical or date. A line chart that drills from year to month keeps its shape meaning. Be careful with a stacked chart: a legend with many values at a deeper level creates dozens of colors. A date hierarchy built from a marked date table is the most reliable setup. Automatic date hierarchies work for quick reports but offer less control over labels and sorting.
Tooltips
A tooltip appears when the reader hovers over a data point. Default tooltips show the field values already in the visual. You can improve them in two ways.
Add fields to the Tooltips well
Drag extra measures into the Tooltips field well. They appear on hover without changing the chart. For example, a bar chart of sales by category can show the margin and the prior-year comparison in its tooltip:
Sales LY =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )Sales YoY % =
DIVIDE ( [Total Sales] - [Sales LY], [Sales LY] )Both measures need a marked date table for SAMEPERIODLASTYEAR to work. DIVIDE returns blank instead of an error when the prior-year value is zero or blank, so the tooltip stays clean.
Report page tooltips
A report page tooltip is a small page that acts as the tooltip, so you can show a mini chart on hover.
- Add a new page and open Format page.
- In Page information, turn on Allow use as tooltip.
- In Canvas settings, set the type to Tooltip, which gives a small page size.
- Add visuals that use the same fields as the context, such as a small line chart of sales over time.
- On the source visual, open Format and then General and Tooltips. Set the type to Report page and select your tooltip page.
The tooltip page receives the filter context of the hovered point. A line chart of monthly sales on the tooltip page will therefore show the trend for the hovered category only.
Tooltip limits
- Tooltips do not work well on touch devices, because there is no hover. Do not hide information that readers need to answer the question.
- Tooltips are not read reliably by every assistive technology. Anything essential must also be visible on the page or in a table.
- A crowded tooltip is as bad as a crowded page. Limit it to three or four values.
How the features fit together
Common problems and fixes
- A click changes nothing. Check Edit interactions for that visual pair. It may be set to None, or the target measure may remove the filter with
ALL. - Highlighting is hard to read. Switch the target visual from Highlight to Filter.
- The drill buttons are missing. The visual needs more than one field in the axis well, or the visual type does not support drill.
- A slicer does not affect another page. Turn on sync for that page in Sync slicers.
- Tooltip shows the wrong numbers. Confirm the tooltip page uses fields from the same tables and that its page filters do not conflict with the incoming context.
- A slicer filters a table that has no relationship. Slicers only filter through model relationships. Fix the relationship, or use a field from a related table.
Decision criteria
| Reader need | Feature to use |
|---|---|
| Narrow the whole page to a region, period or product line | Slicer |
| Explore how one category relates to the rest of the page | Cross-filtering by clicking |
| Go from year to month inside one chart | Drill-down |
| See everything about one item on a dedicated page | Drill-through |
| See a secondary number without cluttering the visual | Tooltip |
| Apply a fixed rule the reader should not change | Filters pane |
Exercise
A bar chart shows sales by product category, and a line chart on the same page shows monthly sales. When a reader clicks the "Bikes" bar, you want the line chart to show only Bikes sales as a trend. The line chart currently shows the full monthly line with a darker portion, which is hard to read. What do you change, and where?
Show answer
Select the bar chart, choose Edit interactions on the Format tab, and set the line chart's interaction to Filter instead of Highlight. The line chart then recalculates to show only monthly sales for Bikes, rather than the full line with a highlighted portion.
Exercise
You add a tooltip showing Sales YoY % to a bar chart, and it displays blank for every bar. The measure uses SAMEPERIODLASTYEAR. Name two likely causes.
Show answer
First, the model may not have a date table marked as a date table, or the date column in the measure may not come from it, so SAMEPERIODLASTYEAR cannot shift the period. Second, the data may have no sales in the prior year for the selected period, so DIVIDE returns blank because the prior-year value is blank.