Concept Breakdown
Basic DAX aggregation functions (SUM, AVERAGE, MAX, MIN) operate directly on a column's values. Iterator functions (SUMX, AVERAGEX) are more powerful, allowing calculations to be performed row by row within a specified table before aggregating the results. This enables more complex calculations that involve multiple columns.
What You Will Learn
Understand when to use SUM, AVERAGE, MAX, MIN, SUMX, AVERAGEX in a Power BI model.
Practice the concept inside a real PBIX report rather than only reading syntax.
Complete a beginner-level task and verify the result with a hidden answer check.
Practice in Power BI
The starter PBIX link has not been attached yet. The student workflow is ready for the admin to connect the file.
Download and unzip the provided 'Tallest Buildings - Basic Measures.pbix' file and open it.
Add a new measure called 'Total height m' to the 'Building measures' table using the SUM function on the 'Height m' column.
Add another measure called 'Average height m' to the 'Building measures' table using the AVERAGE function on the 'Height m' column.
Add 'Total height m' and 'Average height m' to the matrix visual and sort it in descending order of 'Average height m'. Format measures for decimal places as needed.
Create a measure called 'Tallest height m' using the MAX function on the 'Height m' column.
Create a measure called 'Shortest height m' using the MIN function on the 'Height m' column.
Create a measure called 'Height range m' by subtracting the 'Shortest height m' measure from the 'Tallest height m' measure.
Add these three new measures to the matrix visual and sort the matrix in descending order of 'Tallest height m'.
Add a measure called 'Average floor height m' which calculates the sum of 'Height m' divided by the sum of 'Floors above ground'.
Add 'Average floor height m' to the matrix and sort the matrix in descending order of this new column.
Add a measure called 'Total floors' using the SUMX function to sum 'Floors above ground' plus 'Floors below ground' for each row.
Use the AVERAGEX function to create a measure called 'Average floors' that calculates the average of 'Floors above ground' plus 'Floors below ground'.
Add 'Total floors' and 'Average floors' to the matrix visual and sort in descending order of 'Average floors'.
Starter DAX
New measure name = Expected Outcome
A Power BI matrix visual displaying various aggregated and row-context-calculated statistics (total height, average height, tallest, shortest, range, average floor height, total floors, average floors) for buildings, grouped by country and city, sorted according to the instructions.