Sub topic 9
Controlling interactions between visuals
This chapter assumes you can build a Power BI report page with several visuals, you know what a slicer is, and you understand tables, columns, and measures in a data model. It covers how visuals on one page affect each other and how to change that behavior with Edit interactions.
How visuals affect each other by default
Every visual on a report page can act as a filter for the other visuals on that page. Slicers do this by design. Charts, tables, and maps do it when a reader selects an item in them, such as a bar, a slice, or a row.
When a reader selects something in one visual, Power BI changes the other visuals on the page in one of two ways:
- Filter. The other visual recalculates using only the selected data. A column chart of sales by month now shows only the months and values that belong to the selection.
- Highlight. The other visual keeps showing all of its data, but dims the part that does not belong to the selection and emphasizes the part that does. This is useful for comparing a part to the whole.
Which of these happens depends on the visual types and on the interaction setting between the two visuals. Slicers always filter. Cross-highlighting applies to visuals that can show a partial selection, such as bar, column, and pie charts. Cards, tables, and matrices cannot show a highlighted portion, so they filter instead.
The second concept is cross-filtering and cross-highlighting, the general term for one visual's selection changing another. The setting that controls it is called Edit interactions.
Why you would change the defaults
The default is that every visual affects every other visual. That is rarely what you want on a finished report. Common reasons to change it:
- A card showing the grand total should stay fixed while a slicer filters the detail visuals.
- A slicer for a region should affect a map and a table, but not a trend chart that compares all regions.
- A selection in a bar chart should highlight the matching part of a pie chart, not filter the pie chart down to one slice.
- A visual should not respond to selections in a particular other visual because the combination is meaningless.
Edit interactions lets you set the relationship for each pair of visuals separately. The setting belongs to the source visual, which is the one the reader selects in. You choose how each target visual responds to it.
Turning on Edit interactions
- Open the report in Power BI Desktop, or in the Power BI service in edit mode.
- Select the visual that will be the source. This can be a slicer or any other visual.
- On the Format tab of the ribbon in Desktop, select Edit interactions. In the service, look under the Format menu in the top bar.
- Every other visual on the page now shows a small control group in its upper corner. The controls are three icons: Filter, Highlight, and None.
- For each target visual, select the icon you want. The active icon is filled in.
- Select Edit interactions again to leave the mode.
The three options mean:
| Icon | Effect on the target visual | Typical use |
|---|---|---|
| Filter | The target shows only the data that matches the source selection. | Detail tables, cards, and any visual where the rest of the data is not needed. |
| Highlight | The target shows all data, with the matching part emphasized. | Part-to-whole comparisons in bar, column, and pie charts. |
| None | The target ignores the source completely. | Fixed totals, benchmarks, and visuals that should not change. |
Highlight is not offered for every target. If a visual cannot show a partial selection, only Filter and None appear.
A worked example
Suppose a page has these visuals:
- A slicer on
Product[Category]. - A column chart of sales by month.
- A pie chart of sales by region.
- A card that shows total sales for the whole company.
- A table of order lines.
You want this behavior:
- The slicer filters the column chart and the table.
- The slicer does not change the card, which is a company benchmark.
- The pie chart should be filtered by the slicer too.
- Selecting a region slice in the pie chart should highlight that region's share of each month in the column chart, filter the table, and leave the card alone.
Set it up in two passes.
Pass 1, the slicer as source. Select the slicer and turn on Edit interactions. Leave Filter on the column chart, the pie chart, and the table. On the card, select None. Slicers cannot use Highlight, so Filter is the right choice for everything you want to change.
Pass 2, the pie chart as source. Select the pie chart. On the column chart, select Highlight. On the table, select Filter. On the card, select None.
Now a reader who chooses "Bikes" in the slicer sees the column chart, pie chart, and table narrow to bikes while the card keeps the company total. A reader who then clicks the "West" slice sees the monthly columns show the West portion in a darker shade against the full bikes columns.
Where the settings are stored and how they behave
Interaction settings are stored per source-and-target pair, on the page. A few consequences follow.
- Settings are one way. Setting the slicer to None for the card does not stop the card from acting as a source, though a card cannot be selected, so in practice it never sends a filter.
- They apply only within a page. Edit interactions never crosses pages. To make one slicer affect several pages you need synchronized slicers, covered in the next chapter.
- They do not change the data model. They change which filter context reaches each visual. The measures still calculate normally inside whatever filter context arrives.
- New visuals start with the defaults. If you add a visual later, it uses the default Filter or Highlight behavior from every source until you edit it. Revisit the interaction settings after adding visuals.
- Visual-level filters still apply. A visual set to None for a slicer still honors its own filters in the Filter pane. None only blocks the incoming selection from the source.
Changing the default highlight behavior
Some authors prefer that selecting in a chart always filters rather than highlights. You can set the default for new reports in Power BI Desktop under File > Options and settings > Options > Current File > Report settings. In the cross-highlighting section, you can turn on a setting that modifies the default so that charts filter instead of highlight. Check the exact wording in your version, because Microsoft has renamed options between releases. This setting applies to the current file, so decide it before you build the page. Individual pairs can still be changed with Edit interactions.
Readers can also clear a selection by selecting the same item again, or by clicking an empty area of the source visual. For slicers, a reader can use the eraser icon on the slicer header to clear it.
Interactions and DAX measures
Edit interactions controls what filter reaches a visual. A DAX measure can still decide what to do with it. The Total Sales All Products measure from the spine uses REMOVEFILTERS to ignore the Product table:
Total Sales All Products =
CALCULATE ( [Total Sales], REMOVEFILTERS ( Product ) )Compare it with setting a card to None for a slicer:
| Approach | Where it is applied | What it affects |
|---|---|---|
| Edit interactions set to None | On the page, per source and target pair | One target visual ignoring one source visual. Other filters still reach it. |
| `REMOVEFILTERS` in a measure | In the measure itself | Every visual that uses the measure, on every page, for the named table. |
Use Edit interactions when the visual should be unaffected by one specific control on one page. Use DAX when the measure should always represent an unfiltered value, such as a benchmark column in a table that also shows filtered values. A card set to None is still filtered by page and report filters. A measure using REMOVEFILTERS ( Product ) ignores page and report filters on Product too.
Common problems
- A visual does not react to a slicer. Select the slicer, turn on Edit interactions, and check whether the target is set to None. This is the most frequent cause after a layout change.
- A chart looks dimmed instead of filtered. The source is set to Highlight for that target. Switch the target to Filter.
- Highlight is missing as an option. The target visual type cannot show a partial selection. Use Filter or None.
- A card shows the same number whatever the reader picks. Check for None on the card, then check whether its measure uses
ALLorREMOVEFILTERS. - A newly added visual reacts to everything. New visuals use default interactions. Open Edit interactions on each source and set the new visual.
- Selections work in Desktop but readers say they do not. Readers must select data in a visual on the published page. If you hid a visual behind another or disabled interactions with a button or bookmark setup, check the selection pane and the bookmarks.
Summary of the model
Each visual on a page can be a source and a target. The reader's selection in a source sends a filter to every target. For each source and target pair, the author chooses Filter, Highlight, or None. These settings stay on the page, they do not change the data model, and they work alongside measures that can ignore or reshape the filters that arrive.
Exercise
A report page has a Region slicer, a bar chart of sales by product, and a card showing the company's total sales target. You want the slicer to filter the bar chart but leave the card unchanged. Which Edit interactions settings do you apply, and on which visual do you select them?
Show answer
Select the Region slicer as the source and turn on Edit interactions. On the bar chart, choose Filter. On the card, choose None. The settings are made on the source visual (the slicer), one target at a time.
Exercise
A reader selects a slice in a pie chart. The column chart beside it still shows all months but dims part of each column. Is the column chart filtered or highlighted, and how do you change it so the column chart shows only the selected region's data?
Show answer
It is highlighted. Select the pie chart as the source, turn on Edit interactions, and on the column chart choose the Filter icon instead of Highlight.
Exercise
A table must always show a Total Sales All Products column next to the filtered Total Sales column, even when a Category slicer is used. Should you use Edit interactions set to None, or DAX? Explain.
Show answer
Use DAX. Edit interactions works per visual, so setting the table to None would stop the filtered column from responding too. A measure using CALCULATE with REMOVEFILTERS ( Product ) ignores the Product filter only for that column, while Total Sales still responds to the slicer.