We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Aggregations

Aggregation functions in DAX aggregate a result from multiple rows in a column. These are super common DAX functions, and they form the foundation for almost every measure you'll write.

Aggregators answer "How much?", "How many?", or "What's the average?" for a column.

We've already used some of these, but let's cover more of the most common functions in a bit more detail.

Sum

The SUM function adds all values in a column.

Total Quantity = SUM(sales[sale_quantity])

Average

The AVERAGE function calculates the mean value of a column.

Average Discount = AVERAGE(sales[sale_discount])

Count

The COUNT function counts the number of rows that contain a value in a column.

Total Sales = COUNT(sales[sale_id])

Min

The MIN function returns the smallest value in a column.

Minimum Quantity = MIN(sales[sale_quantity])

Max

The MAX function returns the largest value in a column.

Maximum Quantity = MAX(sales[sale_quantity])

Assignment

  1. It may show up in teensy font at the top of the card. Just make sure it's there somewhere.

Save the project and, from the course directory, submit the CLI tests.