The league total on every row
CALCULATE & Filter Context · Intermediate · Chapter 8 of 10. The most important function in DAX, step by step.
The request, from Rhys Abara, Analyst, Northfield League: "Before we work out shares, I need the league's total goals next to every team." A measure named League Goals.
ALL(table) removes every filter on that table. Inside CALCULATE, ALL(Team) ignores the team on the row, so the measure returns the whole league’s goals on every row.
Task: Create League Goals = CALCULATE([Goals], ALL(Team)).
Practice data: Northfield League, a fictional football league with clubs, matches and goals. The model has the Results and Team tables.
DAX functions used: CALCULATE, ALL.
How it works: the exercise opens a practice copy of the Power BI report editor in your browser. Do the task, press Check, and your result is compared with the expected answer in seconds. Hints are there if you get stuck.