Cross-Filter Direction

Power BI · Data Modeling

Theory

Cross-filter direction controls which way a filter travels along a relationship. With Single direction, the filter flows from the 'one' side to the 'many' side: selecting Segment = Corporate in Customers filters Sales to Ravi's and Karan's orders. Sales does not filter Customers back. With Both (bidirectional), filters also flow from the many side to the one side, so filtering Sales can reduce the rows of Customers too.

For example, a slicer on Products[Category] = Home with Single direction will not shrink a Customers slicer to just the customers who bought Home products. Bidirectional filtering would, but it can create ambiguous paths when several tables are connected, slow queries down and give confusing totals. A safer option is to keep Single and solve the specific need in a measure using CROSSFILTER, or to filter a slicer with a visual-level filter on a measure such as [Total Sales] is not blank.

Why we use it

Direction decides which visuals affect which. Understanding it explains why a slicer sometimes 'does nothing', and why turning everything to Both can make numbers wrong or slow.

When to use it

Keep Single direction on dimension-to-fact relationships as the default. Use Both sparingly, for example on a bridge table in a many-to-many design, or apply it in one measure with CROSSFILTER instead of on the whole model.

How it works

  1. A filter is applied on a table
  2. Filter moves along the relationship
  3. Is the filter moving from the one side to the many side? Yes: It always propagates. No: It propagates only if direction is Both.
  4. Measures evaluate on the filtered rows
  5. Visual shows filtered results

Syntax

Model view → double-click relationship → Cross filter direction: Single | Both
DAX (per measure):
CROSSFILTER(<columnName1>, <columnName2>, <direction>)  // direction: None | OneWay | Both

Example

// Count customers who bought Home products, keeping the model relationship Single
Customers Buying = 
CALCULATE(
    DISTINCTCOUNT(Customers[CustomerID]),
    CROSSFILTER(Sales[CustomerID], Customers[CustomerID], Both)
)
// With a Category = Home filter: Asha and Karan bought Desk Lamps → 2

Key points

Power BI topics

Power BI Introduction

Getting Data

Power Query (Data Transformation)

Data Modeling

DAX (Data Analysis Expressions)

Data Visualization

Dashboards & Reports

Power BI Service

Advanced Features

Projects & Case Studies

Interview & Certification

Advanced DAX & Time Intelligence

T
Tech Town
Log InSign Up Free
Home SQL Python DSA Power BI Snowflake Databricks Spark Gen AI Practice Problems Contest Blog

Power BI Dashboards & DAX

Learn data visualization and interactive dashboards step-by-step. Click any topic in the sidebar to open it right here.

{{ sectionCount }}
Sections
{{ topicCount }}
Topics
Free
Forever
Hands-on practice Practice DAX Online 250 business scenarios on a star schema — write a measure and compare your visual with the expected one. Start practising →
Section {{ sec.num }}

{{ sec.label }}

Power BI  /  {{ current.sectionLabel }}  /  {{ current.name }}

{{ current.name }}

Theory

{{ current.def }}

Why we use it

{{ rich.why }}

When to use it

{{ rich.when }}

Diagram

{{ rich.dg.caption }}

{{ tb.title }}
{{ c.v }}
{{ rich.dg.op }}
➜
{{ rich.dg.output.title }}
{{ c.v }}
{{ nd.label }}
{{ nd.sub }}
{{ nd.label }}
{{ nd.sub }}
{{ rich.dg.left.title }}
{{ it }}
{{ rich.dg.right.title }}
{{ it }}
On screen — where to click

{{ rich.ui.title }}

{{ u.text }}
  1. {{ st.n }}{{ st.text }}
{{ rich.ui.title }}
{{ u.text }}
Flowchart — how it works
{{ nd.text }}
{{ nd.text }}
◇ {{ nd.text }}
Yes → {{ nd.yes }}
No → {{ nd.no }}
Syntax / Where to find it
{{ current.syntax }}
Example
{{ current.example }}
What You'll Learn — click to check off
  • {{ pt.mark }} {{ pt.text }}

Share this topic