DAX Concept

Calculating Aggregate Film Statistics by Genre Using SUMMARIZE

Learn how to use the SUMMARIZE function to group data and calculate aggregate measures such as average film length and total Oscars won per genre.

IntermediateSUMMARIZE

Concept Breakdown

The SUMMARIZE function returns a summary table for the requested totals over a set of groups. It works by taking a table, grouping columns, and then allowing you to define new columns with aggregation functions (e.g., SUM, AVERAGE, COUNT) that operate within each group. This is a powerful function for creating custom aggregations and is often a foundational step in more complex DAX queries.

What You Will Learn

  1. Understand when to use SUMMARIZE in a Power BI model.

  2. Practice the concept inside a real PBIX report rather than only reading syntax.

  3. Complete a intermediate-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.

  1. Download and unzip the provided Power BI file.

  2. Open the Power BI file and connect to its data model using DAX Studio.

  3. Create a new DAX query in DAX Studio.

  4. Use the SUMMARIZE function to group the 'Films' table by 'Genre'.

  5. Add a new column to calculate the average 'Length' (run time in minutes) for each genre.

  6. Add another new column to calculate the total 'OscarsWon' for each genre.

  7. Order the results alphabetically by 'Genre'.

  8. Execute the query and observe the output.

  9. Save your query as Genre stats.dax.

Starter DAX

EVALUATE
CALCULATETABLE (
    'Table_Name',
    'Column_Name' = "Value"
)

Expected Outcome

A table listing each unique film genre in alphabetical order, showing the calculated average run time in minutes and the total number of Oscars won for all films within that genre.

Checking your sign-in status...