Power BI · Chapter 9 · Concept lesson · 7 min read

Every click is a filter

A click does not redraw a picture. It adds a filter to the model, the filter flows along the relationships, and every measure on the page re-evaluates with it. Knowing the path explains both the magic and the bugs.

The idea

A Power BI page looks like a collection of pictures, but nothing on it is a picture until the end. Each visual is a question, and the question is a measure asked under a set of filters. When the reader clicks a bar, picks a value in a slicer or sets a page filter, they are not changing what the pictures look like. They are adding a filter, and every measure on the page runs again with it.

That one idea explains why interactivity "just works" for ordinary measures, and why a handful of measures go wrong the moment someone touches the report.

Figure 1

A click on the app bar in a channel chart

'Date'

  • Date
  • Year
  • Month

orders

  • order_id
  • order_date
  • channel
  • status

channel = "app"

customers

  • customer_id
  • segment
  • state

products

  • product_id
  • category

order_items

  • order_id
  • product_id
  • line_total

Step 1 of 4 A page has a bar chart of sales by orders[channel] and, beside it, a chart of sales by products[category]. Both read order_items.

  1. A page has a bar chart of sales by orders[channel] and, beside it, a chart of sales by products[category]. Both read order_items.
  2. The reader clicks the app bar. The click becomes a filter on orders[channel], exactly like a slicer would.
  3. The filter flows down to order_items. The category chart re-evaluates Sales on app lines only, so its bars shrink: that is cross-filtering.
  4. Filters do not climb back up. A card showing COUNTROWS(customers) has nothing from this click reaching it, so it does not change, and the reader wonders why.

Why it exists

A static report answers the question its author thought of. Harbor & Pine's managers each have a different question: web in the West, Lighting for the holidays, business customers only. An author who builds a page per question never finishes. Letting the reader supply the filters, and keeping the measures written once (the same Sales in a card, a chart and a tooltip), is what makes one page serve forty people.

The cost is that the author no longer controls which filters a measure sees. A measure is evaluated under whatever the reader chooses, and it was written for the case the author imagined.

How it works under the hood

Between a click and a new picture there is a fixed chain of events.

  1. The click becomes a filter on a column. A bar for the app channel is orders[channel] = "app"; a slicer value is the same thing.
  2. Edit interactions decides who gets it. By default a chart filters the others. You can switch a target visual to highlight (the full bar stays in the background, the filtered part is drawn on top) or none (ignore). It is a per-visual setting under Format → Edit interactions.
  3. The filter flows along the relationships, one side to many side, to the table the measure reads.
  4. Each measure evaluates again under all the filters combined.

Figure 2

What happens between the click and the new picture

  1. Click or slicer On a bar, a point, a slicer value
  2. orders[channel] = "app" The click as a filter
  3. Edit interactions Per visual: filter, highlight or none
  4. Each measure Re-evaluates under the new filters
  5. Repaint Every affected visual redraws

Step 1 of 5 A click or a slicer value is the start of the chain, not a repaint.

  1. A click or a slicer value is the start of the chain, not a repaint.
  2. It is translated into a filter on one column of one table.
  3. **Format → Edit interactions** decides, visual by visual, whether the filter applies, only highlights, or is ignored.
  4. Every visual that accepted the filter evaluates its measures again under it. A measure with ALL or CALCULATE inside may keep or discard that filter on purpose.
  5. Only then does the picture change.

Filter or highlight

The difference between the two interaction modes is easy to see on the category chart after a click on the app bar. With filter, the Furniture bar becomes the Furniture sales of app orders and the bar is shorter. With highlight, the bar keeps its full length in a faded colour and the app part is drawn inside it, so the reader sees both the whole and the slice. Highlight is the better choice when the slice should be read as a part of something; filter is better when the rest is noise. Highlight only works for measures that can be split by the selected value, so a measure that uses ALL on that column will look wrong in it.

The three filter levels

A filter can live on a visual, on a page, or on the whole report, and all three combine with AND. Put a filter on the visual when it belongs to that chart alone, on the page when it defines what the page is about ("completed orders only"), and on the report when nothing in the file should ever see the rest. Slicers are the same filters, put in the reader's hands.

Measures that ignore the click on purpose

Sometimes a measure should not obey every filter. A share needs two numbers: the cell, and the total it is a share of. The total is a CALCULATE that removes some filters, and which function you use decides how the reader's slicer is treated.

Figure 3

Share of total with a channel slicer: ALL against ALLSELECTED

Slicer: nothing selected
channelSalesShare of allShare of selection
app$995,52443.3%43.3%
marketplace$324,29914.1%14.1%
web$980,34742.6%42.6%
Slicer: web
channelSalesShare of allShare of selection
web$980,34742.6%100.0%

Step 1 of 4 Completed 2025 sales by channel, nothing selected. Share of all divides by a total with ALL(orders[channel]), Share of selection by one with ALLSELECTED. They agree.

  1. Completed 2025 sales by channel, nothing selected. Share of all divides by a total with ALL(orders[channel]), Share of selection by one with ALLSELECTED. They agree.
  2. The reader picks web in the slicer. Only the web row is left.
  3. ALL removes every filter on channel, the slicer's included, so the denominator is still the whole year: 42.6%. Good if the page is about the company.
  4. ALLSELECTED removes only the filter of this row and keeps the slicer's. The denominator is web alone, so the share is 100.0%. Good when the reader means "share of what I picked".

ALL(orders[channel]) ignores the slicer: the share is "of the company". ALLSELECTED keeps it: the share is "of what I picked". Neither is wrong; only one matches the sentence the page promises.

Measures that follow the click

The opposite need is a measure that reads the selection. SELECTEDVALUE(orders[channel], "All channels") returns the single selected channel, or the fallback when none or several are selected. Used in a measure it gives a title that says what the reader picked. A Top 3 built with TOPN and a rank inside a measure also follows the reader, where a visual-level Top N filter fixes the count in the visual.

Where it lives in Power BI Desktop

Use View → Selection pane and Bookmarks to store which filters, visibility and focus are saved; a bookmark records the state of the page, not the data. Tooltips come from Format → Visual → Tooltips, and a report-page tooltip is a small page that receives the hovered point as a filter.

Common misconceptions

"A slicer changes the chart"

A slicer changes the filters, and the chart's measure re-evaluates. The distinction matters because a measure can choose to ignore it. A card showing the company's total sales next to a slicer that does nothing to it is not a bug if the measure uses ALL; it is a decision to document.

"Clicking a bar filters every visual on the page"

Only the visuals whose interaction is set to filter, and only those whose measure reads a table the filter reaches. A customer count does not change when you click a channel, because the filter flows from orders down to order_items and never up to customers. Check the model's arrows and Edit interactions before you suspect the DAX.

"Share of total is a percentage; a slicer cannot break it"

A share with ALL in its denominator stays calm under a slicer, but one that forgot to remove the row's filter turns into 100.0% in every row. Which is right depends on the sentence the reader sees. Test the measure with nothing selected, one value and all values before you ship the page.

Check yourself

One question. Answering it ticks this lesson off on the map; it never locks a level.

Share = DIVIDE([Sales], CALCULATE([Sales], ALLSELECTED(orders[channel]))) sits in a matrix with channel on rows. The reader picks only web in the slicer. What does the web row show?

Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.