Share of the league’s goals
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: "Which teams carry the scoring? Give me each team's share of all goals in the league." A measure named Goal Share, as a percentage.
A share is “this row ÷ all rows”. Combine DIVIDE with the ALL pattern: the team’s goals divided by the goals of every team.
Task: Create Goal Share = DIVIDE([Goals], CALCULATE([Goals], ALL(Team))) and format it as a percentage.
Practice data: Northfield League, a fictional football league with clubs, matches and goals. The model has the Results and Team tables.
DAX functions used: DIVIDE, 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.