Cardinality and cross filter direction

Every relationship has two properties that decide between right and wrong numbers: which side is the one (cardinality) and which way the filter flows (cross filter direction).

In short: the one side is the table in which every key appears only once (the dimension). Almost every relationship is Many to one (*:1) from the fact table to the dimension. Cross filter direction Single lets filters flow only from the one side to the many side, Both back as well.

Prerequisites: Relationships.

Try it now

This time you pick the columns the other way round. Which cardinality fits?

Task Create the relationship between Product and Sales like this: column in table 1 Product[ProductID], column in table 2 Sales[ProductID]. Which cardinality fits then?

Sales 120 rows, 7 columns
OrderIDOrderDateShipDateProductIDRegionIDQuantityAmount
13 Oct 20266 Oct 20261221798
29 Nov 202519 Nov 20252351145
320 Sep 202627 Sep 2026544596
416 Jun 20252 Jul 20252151145
526 Mar 202631 Mar 20261343596
64 Dec 202510 Dec 2025545745
78 Jul 202526 Jul 2025614196
820 Feb 20251 Mar 202532359.7
99 Dec 202524 Dec 202562298
1012 Aug 202625 Aug 2026212458
117 Sep 202612 Sep 2026542298
122 Mar 202614 Mar 2026623147

Showing the first 12 of 120 rows.

Measures: [Total Sales]

Product 6 rows, 4 columns
ProductIDProductCategoryPrice
1LaptopHardware899
2MonitorHardware229
3MouseAccessories19.9
4KeyboardAccessories39.9
5Office suiteSoftware149
6AntivirusSoftware49
Region 4 rows, 2 columns
RegionIDRegion
1North
2South
3West
4East
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

Cardinality

CardinalityMeaningExample
Many to one (*:1)table 1 has each key many times, table 2 onceSales to Product
One to many (1:*)the same relationship, picked the other way roundProduct to Sales
One to one (1:1)every key once on both sidesEmployee to personnel file
Many to many (*:*)duplicate keys on both sidesrare, usually a sign of an unfinished model

Power BI suggests the cardinality itself when you create the relationship, based on the data. Set it the wrong way round and it refuses the relationship: the column on the one side then contains duplicate values. The exercises here know Many to one and One to many, the two that occur in a star schema.

Cross filter direction

With Single, the filter flows from the dimension into the fact table: a filter on Region selects that region's orders. The orders, in turn, filter nothing in the other dimensions. If you want to know which products a region sold, you need exactly that way back: Region filters Sales, Sales filters Product. Both on the relationship between Sales and Product does that.

Task The sales manager wants to know how many different products each region sold in February 2026. The measure [Product Count] counts the rows of Product but shows 6 everywhere. Set the cross filter direction of the relationship Sales → Product so the region filter gets through to Product.

Sales 120 rows, 7 columns
OrderIDOrderDateShipDateProductIDRegionIDQuantityAmount
13 Oct 20266 Oct 20261221798
29 Nov 202519 Nov 20252351145
320 Sep 202627 Sep 2026544596
416 Jun 20252 Jul 20252151145
526 Mar 202631 Mar 20261343596
64 Dec 202510 Dec 2025545745
78 Jul 202526 Jul 2025614196
820 Feb 20251 Mar 202532359.7
99 Dec 202524 Dec 202562298
1012 Aug 202625 Aug 2026212458
117 Sep 202612 Sep 2026542298
122 Mar 202614 Mar 2026623147

Showing the first 12 of 120 rows.

Measures: [Total Sales], [Product Count]

Product 6 rows, 4 columns
ProductIDProductCategoryPrice
1LaptopHardware899
2MonitorHardware229
3MouseAccessories19.9
4KeyboardAccessories39.9
5Office suiteSoftware149
6AntivirusSoftware49
Region 4 rows, 2 columns
RegionIDRegion
1North
2South
3West
4East
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

When Both, when not?

Both is convenient but has side effects: every filter travels further through the model, reports get slower, and with several paths between two tables the model becomes ambiguous; Power BI then refuses the setting. A proven approach: every relationship Single, and where a way back is needed, a measure calculates it deliberately, for example with DISTINCTCOUNT on the key in the fact table or with CROSSFILTER inside CALCULATE.

In real Power BI

  1. Edit a relationship: double-click the line in model view.
  2. Choose Cardinality and Cross filter direction from the lists, OK.
  3. On the line, 1 and * show the cardinality and the arrow in the middle the filter direction; two arrows mean Both.

Common mistakes

Duplicate keys in the dimension

If a product appears twice in the product table, there is no one side any more. Clean the dimension in Power Query (Remove Duplicates) instead of falling back to many to many.

Both everywhere

Setting every relationship to Both gives numbers that are hard to follow and, sooner or later, the message that another active path already exists between two tables.

Frequently asked questions

Why does a matrix show the same number everywhere?

Almost always a relationship is missing or the filter direction points the wrong way: the row's filter does not reach the table the measure counts.

Is one to many different from many to one?

No, it is the same relationship. It only depends on which table you picked at the top and which at the bottom of the dialog.

Learn this next: date table

A table of its own with every day, connected and marked as a date table.

Date table

Write to us

Choose language

Select your preferred language