← All challenges

M1 · Modeling · about 10 min

Every Team Shows the Same Runs

easy

A table with one row per team shows 2,665 runs on every row. That is the league total. The measure is just SUM( Batting[Runs] ), so the problem is not the DAX.

Your task

Fix the model so that runs split correctly by team. Do not write a measure. Do not make any relationship bidirectional.

What the grader checks

You see the situations, not the expected numbers. The expected values are computed live from your file and the source data.

  • T1Runs by team
    A table with one row per team and total runs.
  • T2Season slicer: 2024
    Runs by team with Season set to 2024.
  • T3One team selected
    Team slicer set to one team: the total must be that team's runs, not the league's.
  • M1Teams relates to Games on TeamID, one to many
    A relationship from Teams[TeamID] (one) to Games[TeamID] (many) exists and is active.
  • M2No bidirectional filters
    Every relationship in the model filters in one direction only.

Stuck?

Open one hint at a time.

Hint 1

Open Model view. Filters travel along relationships. When you put Team on the rows, how does that filter reach the Batting table?

Hint 2

Batting is related to Games and to Players. Games has a TeamID. Is there a line between Teams and anything else?

Hint 3 (near-answer)

Create a relationship from Teams[TeamID] to Games[TeamID]: one to many, single direction. Leave the cross-filter direction alone.

Show the editorial

Solve it first if you can: the editorial gives the answer away.

The trap

The table of teams is not connected to the facts. Team is on the rows but the filter it creates has nowhere to go, so every row sums all of Batting and shows the league total. The measure is correct; the model is not. The tempting fixes are in the wrong place: rewriting the DAX per team, or making existing relationships bidirectional.

The fix

Create Teams[TeamID] to Games[TeamID], one to many, single direction.

Why it works

A filter on Teams reaches Games through the relationship, and Games filters Batting through GameID. Each team row now filters down to its own games and its own runs. No DAX changes, and each measure you write later gets the right answer.

When a measure gives the same number on every row, look at the model before the DAX. Filters only travel along relationships.