Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.2 Basic DAX Functions: SUM, COUNT, AVERAGE, MIN, MAX

Lesson 23 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

Basic DAX Aggregation Functions

These are the most commonly used DAX functions for summarizing data. They form the foundation of most Power BI measures.

SUM()

Returns the sum of all values in a column.

Syntax: SUM(ColumnName)

Example:

Total Revenue = SUM(Sales[Revenue])

Note: SUM only works with numeric columns.

SUMX()

Evaluates an expression for each row and returns the sum. Use when you need row-level calculations before summing.

Syntax: SUMX(Table, Expression)

Example:

Total Sales = SUMX(Sales, Sales[Quantity] * Sales[UnitPrice])

COUNT() and COUNTA()

FunctionDescription
COUNT()Counts rows with numeric values (ignores blanks and text)
COUNTA()Counts rows with any non-blank value (numbers + text)
COUNTBLANK()Counts blank/empty rows
COUNTROWS()Counts all rows in a table
DISTINCTCOUNT()Counts unique values in a column

Examples:

Order Count = COUNTROWS(Sales)
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])

AVERAGE() and AVERAGEX()

Returns the arithmetic mean of values.

Syntax: AVERAGE(ColumnName)

Examples:

Avg Order Value = AVERAGE(Sales[Amount])
Avg Revenue Per Product = AVERAGEX(Products, [Total Revenue])

MIN() and MAX()

Return the smallest and largest values respectively.

Syntax: MIN(ColumnName) / MAX(ColumnName)

Examples:

Lowest Price = MIN(Products[Price])
Highest Sale = MAX(Sales[Amount])

With Two Arguments (Scalar Comparison):

Lower Value = MIN(Sales[Budget], Sales[Actual])

Quick Reference Table

FunctionPurposeExample
SUM()Total of a columnSUM(Sales[Amount])
SUMX()Row-by-row sumSUMX(Sales, [Qty] * [Price])
COUNT()Count numeric valuesCOUNT(Sales[OrderID])
COUNTA()Count non-blank valuesCOUNTA(Sales[Notes])
COUNTROWS()Count all rowsCOUNTROWS(Sales)
DISTINCTCOUNT()Count unique valuesDISTINCTCOUNT(Sales[CustomerID])
AVERAGE()Mean valueAVERAGE(Sales[Amount])
MIN()Minimum valueMIN(Sales[Amount])
MAX()Maximum valueMAX(Sales[Amount])