Basic Functions (SUM, AVERAGE, COUNT)0%
Basic Functions (SUM, AVERAGE, COUNT)
Beginner12 min read•Updated: Jul 11, 2026
Basic Functions (SUM, AVERAGE, COUNT)
Reading Time: 8 Mins | Level: Beginner to Advanced
1. Basic Aggregation Functions in DAX
Standard aggregation functions summarize numerical columns down to a single scalar value:
DAX
// Sum of a column
Total Sales = SUM(Sales[Revenue])
// Average of a column
Average Transaction Value = AVERAGE(Sales[Revenue])
// Count of non-blank rows
Total Transactions = COUNT(Sales[Transaction_ID])
// Count of unique customers
Unique Customers = DISTINCTCOUNT(Sales[Customer_ID])
2. The 'X' Iterator Functions (SUMX, AVERAGEX)
Standard SUM() can only take a single column as input. If you need to multiply two columns row-by-row and then sum the result, use the iterator function SUMX():
DAX
// Iterates row-by-row through Sales table, multiplies Qty * Price, then sums the total!
Total Revenue = SUMX(Sales, Sales[Quantity] * Sales[Unit_Price])
Interactive Quiz
Multiple Choice Questions
Question 1
Which DAX function counts the number of distinct, unique values in a column?
Question 2
What is the difference between
SUM() and SUMX() in DAX?Question 3
Which function counts rows in a table including rows that contain blanks?
Question 4
What does
DIVIDE(Sales[Profit], Sales[Revenue], 0) accomplish that a simple forward slash Profit / Revenue does not?Question 5
In DAX, which function returns the maximum value found in a column?
Next Lesson
Calculated Measures
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
Related Lessons
| Previous Lesson | Next Lesson |
|---|---|
| What is DAX? | Calculated Measures |
Practice Quiz
Test your understanding of this lesson with 5 questions. Each question has one correct answer.