Skip to main content




How to use DAX aggregate functions in Power BI with examples? Microsoft Power BI DAX provides various aggregate functions, which allow us to perform aggregations such as calculating sum, average, minimum, maximum, etc.

To demonstrate these Power BI DAX aggregate functions, we will use the data shown below. As you can see, there are 15 records in this table.

power-bi-dax-aggregate-functions-1-4869148

Power BI DAX aggregate functions

The following examples show the list of DAX aggregate functions in Power BI

Power BI DAX sum function

The sum function in Power BI DAX calculates the total or sum of records in a column. The syntax for the Power BI DAX sum function is

Measure Name = SUM (Expression or Column Name)

To demonstrate these DAX aggregation functions in Power BI, we have to use Measures. To create a measure, click the New measure option in Power BI Home tab, or Modeling tongue.

power-bi-dax-aggregate-functions-2-8525360

Renamed the default indicator to Sum of Sales. As you can see in the screenshot below, while typing, Power BI IntelliSense displays the suggestions.

Let me select the Power BI DAX SUM function

power-bi-dax-aggregate-functions-3-1802040

For Power BI DAX Aggregate Functions demonstration purpose, we will calculate the sum of sales in this table

power-bi-dax-aggregate-functions-4-1103030

Clicking Enter or any key creates a new Measure called SalesSum. And the final Code is

SalesSum = SUM (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-5-4432030

Let me create a card using this measurement. See the articles Create a card and Format card to understand the steps required to create and format cards.

power-bi-dax-aggregate-functions-6-5784996

Average Power BI DAX function

The Power BI DAX averaging function is used to calculate the average of records in a column. The syntax for the Power BI DAX average function is

Measure Name = AVERAGE (Expression or Column Name)

As you can see in the screenshot below, we created a measure (named AVGSale) to calculate the average of the Sales column. And the Code is

AVGSale = AVERAGE (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-7-9439896

Next, let me create a card using this average measurement.

Power BI DAX MIN function

The Power BI DAX MIN function finds the minimum value in a column. The syntax for the Power BI DAX MIN function is

Measure Name = MIN (Expression or Column Name)

As you can see in the following screenshot, we created a Measure (named MinSale) to find the Minimum Sales amount in the Sales column. And the Code is

MinSale = MIN (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-8-1116693

Next, let me create a card using this minimum measurement.

Power BI DAX MAX function

The Power BI DAX MAX function finds the maximum value in a column. The syntax for the Power BI DAX MAX function is

Measure Name = MAX (Expression or Column Name)

Here, we create a Measure (called MaxSale) to find the Maximum Sales amount in the Sales column. And the Code is

MaxSale = MAX (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-9-7935034

Power BI DAX COUNT function

The Power BI DAX COUNT function counts the number of numeric records in a column. The syntax for the Power BI DAX count function is

Measure Name = COUNT (Expression or Column Name)

Here, we create a measure (called CountSale) to count the number of numeric records in the New Sales column. And the Code is

CountSales = COUNT (EmployeeSales [NewSale])
power-bi-dax-aggregate-functions-10-2660442

Power BI DAX VAR.S function

The DAX VAR.S function finds the statistical variance of whole records. The syntax for the Power BI DAX VAR.S function is

Measure Name = VAR.S (Expression or Column Name)

Here, we create a measure (named VarSIncome) to find the statistical variance of a column of annual income. And the Code is

VarSIncome = VAR.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-11-5809557

Power BI DAX VAR.P function

The Power BI DAX VAR.P function finds the statistical variance of some selected records or. The syntax for the Power BI DAX VAR.P function is

Measure Name = VAR.P (Expression or Column Name)

Here, we create a Measure (name VarSIncome) to find the statistical variance P of a column of Annual Income. And the Code is

VarPIncome = VAR.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-12-6660743

Power BI DAX STDEV.P function

The DAX STDEV.P function finds the standard deviation of the selected records. The syntax for the Power BI DAX STDEV.P function is

Measure Name = STDEV.P (Expression or Column Name)

Here, we create a measure (called STDEVPIncome) to find the standard deviation of a column of annual income. And the Code is

StdevPIncome = STDEV.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-13-7634775

Power BI DAX STDEV.S function

The DAX STDEV.S function finds the standard deviation of whole records. The syntax for the Power BI DAX STDEV.S function is

Measure Name = STDEV.S (Expression or Column Name)

Here, we create the Measure (named STDEVSIncome) to find the standard deviation of a column of Annual Income. And the Code is

StdevSIncome = STDEV.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-14-9062379

Let me create a new card for the standard device measurement

power-bi-dax-aggregate-functions-15-9735030

Power BI DAX MAX function example 2

The Power BI DAX MAX function also accepts two arguments. You can use this function to find the maximum value between those two. The syntax for the Power BI DAX MAX function is:

Measure Name = MAX (Expression1, Expression2)

Here, we create a new column (called MaxValue) to find the largest value between Sales and Average Sales. I suggest you refer to the Create a column article to understand the steps required to create a column.

power-bi-dax-aggregate-functions-16-8007646

Power BI DAX MIN function example 2

The Power BI DAX MIN function accepts two arguments. Use this Power BI MIN function to find the smallest value between two numbers. The syntax is:

Measure Name = MIN (Expression1, Expression2)

Here, we create a new column (named MinValue) to find the smallest value between Sales and Average Sales.

power-bi-dax-aggregate-functions-17-1801077

Let me add those two columns Maximum Value and Minimum Value to this table.

power-bi-dax-aggregate-functions-18-9379283




How to use DAX aggregate functions in Power BI with examples? Microsoft Power BI DAX provides various aggregate functions, which allow us to perform aggregations such as calculating sum, average, minimum, maximum, etc.

To demonstrate these Power BI DAX aggregate functions, we will use the data shown below. As you can see, there are 15 records in this table.

power-bi-dax-aggregate-functions-1-4869148

Power BI DAX aggregate functions

The following examples show the list of DAX aggregate functions in Power BI

Power BI DAX sum function

The sum function in Power BI DAX calculates the total or sum of records in a column. The syntax for the Power BI DAX sum function is

Measure Name = SUM (Expression or Column Name)

To demonstrate these DAX aggregation functions in Power BI, we have to use Measures. To create a measure, click the New measure option in Power BI Home tab, or Modeling tongue.

power-bi-dax-aggregate-functions-2-8525360

Renamed the default indicator to Sum of Sales. As you can see in the screenshot below, while typing, Power BI IntelliSense displays the suggestions.

Let me select the Power BI DAX SUM function

power-bi-dax-aggregate-functions-3-1802040

For Power BI DAX Aggregate Functions demonstration purpose, we will calculate the sum of sales in this table

power-bi-dax-aggregate-functions-4-1103030

Clicking Enter or any key creates a new Measure called SalesSum. And the final Code is

SalesSum = SUM (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-5-4432030

Let me create a card using this measurement. See the articles Create a card and Format card to understand the steps required to create and format cards.

power-bi-dax-aggregate-functions-6-5784996

Average Power BI DAX function

The Power BI DAX averaging function is used to calculate the average of records in a column. The syntax for the Power BI DAX average function is

Measure Name = AVERAGE (Expression or Column Name)

As you can see in the screenshot below, we created a measure (named AVGSale) to calculate the average of the Sales column. And the Code is

AVGSale = AVERAGE (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-7-9439896

Next, let me create a card using this average measurement.

Power BI DAX MIN function

The Power BI DAX MIN function finds the minimum value in a column. The syntax for the Power BI DAX MIN function is

Measure Name = MIN (Expression or Column Name)

As you can see in the following screenshot, we created a Measure (named MinSale) to find the Minimum Sales amount in the Sales column. And the Code is

MinSale = MIN (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-8-1116693

Next, let me create a card using this minimum measurement.

Power BI DAX MAX function

The Power BI DAX MAX function finds the maximum value in a column. The syntax for the Power BI DAX MAX function is

Measure Name = MAX (Expression or Column Name)

Here, we create a Measure (called MaxSale) to find the Maximum Sales amount in the Sales column. And the Code is

MaxSale = MAX (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-9-7935034

Power BI DAX COUNT function

The Power BI DAX COUNT function counts the number of numeric records in a column. The syntax for the Power BI DAX count function is

Measure Name = COUNT (Expression or Column Name)

Here, we create a measure (called CountSale) to count the number of numeric records in the New Sales column. And the Code is

CountSales = COUNT (EmployeeSales [NewSale])
power-bi-dax-aggregate-functions-10-2660442

Power BI DAX VAR.S function

The DAX VAR.S function finds the statistical variance of whole records. The syntax for the Power BI DAX VAR.S function is

Measure Name = VAR.S (Expression or Column Name)

Here, we create a measure (named VarSIncome) to find the statistical variance of a column of annual income. And the Code is

VarSIncome = VAR.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-11-5809557

Power BI DAX VAR.P function

The Power BI DAX VAR.P function finds the statistical variance of some selected records or. The syntax for the Power BI DAX VAR.P function is

Measure Name = VAR.P (Expression or Column Name)

Here, we create a Measure (name VarSIncome) to find the statistical variance P of a column of Annual Income. And the Code is

VarPIncome = VAR.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-12-6660743

Power BI DAX STDEV.P function

The DAX STDEV.P function finds the standard deviation of the selected records. The syntax for the Power BI DAX STDEV.P function is

Measure Name = STDEV.P (Expression or Column Name)

Here, we create a measure (called STDEVPIncome) to find the standard deviation of a column of annual income. And the Code is

StdevPIncome = STDEV.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-13-7634775

Power BI DAX STDEV.S function

The DAX STDEV.S function finds the standard deviation of whole records. The syntax for the Power BI DAX STDEV.S function is

Measure Name = STDEV.S (Expression or Column Name)

Here, we create the Measure (named STDEVSIncome) to find the standard deviation of a column of Annual Income. And the Code is

StdevSIncome = STDEV.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-14-9062379

Let me create a new card for the standard device measurement

power-bi-dax-aggregate-functions-15-9994539

Power BI DAX MAX function example 2

The Power BI DAX MAX function also accepts two arguments. You can use this function to find the maximum value between those two. The syntax for the Power BI DAX MAX function is:

Measure Name = MAX (Expression1, Expression2)

Here, we create a new column (called MaxValue) to find the largest value between Sales and Average Sales. I suggest you refer to the Create a column article to understand the steps required to create a column.

power-bi-dax-aggregate-functions-16-8007646

Power BI DAX MIN function example 2

The Power BI DAX MIN function accepts two arguments. Use this Power BI MIN function to find the smallest value between two numbers. The syntax is:

Measure Name = MIN (Expression1, Expression2)

Here, we create a new column (named MinValue) to find the smallest value between Sales and Average Sales.

power-bi-dax-aggregate-functions-17-6329851

Let me add those two columns Maximum Value and Minimum Value to this table.

power-bi-dax-aggregate-functions-18-3384301




How to use DAX aggregate functions in Power BI with examples? Microsoft Power BI DAX provides various aggregate functions, which allow us to perform aggregations such as calculating sum, average, minimum, maximum, etc.

To demonstrate these Power BI DAX aggregate functions, we will use the data shown below. As you can see, there are 15 records in this table.

power-bi-dax-aggregate-functions-1-4869148

Power BI DAX aggregate functions

The following examples show the list of DAX aggregate functions in Power BI

Power BI DAX sum function

The sum function in Power BI DAX calculates the total or sum of records in a column. The syntax for the Power BI DAX sum function is

Measure Name = SUM (Expression or Column Name)

To demonstrate these DAX aggregation functions in Power BI, we have to use Measures. To create a measure, click the New measure option in Power BI Home tab, or Modeling tongue.

power-bi-dax-aggregate-functions-2-8525360

Renamed the default indicator to Sum of Sales. As you can see in the screenshot below, while typing, Power BI IntelliSense displays the suggestions.

Let me select the Power BI DAX SUM function

power-bi-dax-aggregate-functions-3-1802040

For Power BI DAX Aggregate Functions demonstration purpose, we will calculate the sum of sales in this table

power-bi-dax-aggregate-functions-4-1103030

Clicking Enter or any key creates a new Measure called SalesSum. And the final Code is

SalesSum = SUM (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-5-4432030

Let me create a card using this measurement. See the articles Create a card and Format card to understand the steps required to create and format cards.

power-bi-dax-aggregate-functions-6-5784996

Average Power BI DAX function

The Power BI DAX averaging function is used to calculate the average of records in a column. The syntax for the Power BI DAX average function is

Measure Name = AVERAGE (Expression or Column Name)

As you can see in the screenshot below, we created a measure (named AVGSale) to calculate the average of the Sales column. And the Code is

AVGSale = AVERAGE (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-7-9439896

Next, let me create a card using this average measurement.

Power BI DAX MIN function

The Power BI DAX MIN function finds the minimum value in a column. The syntax for the Power BI DAX MIN function is

Measure Name = MIN (Expression or Column Name)

As you can see in the following screenshot, we created a Measure (named MinSale) to find the Minimum Sales amount in the Sales column. And the Code is

MinSale = MIN (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-8-1116693

Next, let me create a card using this minimum measurement.

Power BI DAX MAX function

The Power BI DAX MAX function finds the maximum value in a column. The syntax for the Power BI DAX MAX function is

Measure Name = MAX (Expression or Column Name)

Here, we create a Measure (called MaxSale) to find the Maximum Sales amount in the Sales column. And the Code is

MaxSale = MAX (EmployeeSales [Sales])
power-bi-dax-aggregate-functions-9-6980903

Power BI DAX COUNT function

The Power BI DAX COUNT function counts the number of numeric records in a column. The syntax for the Power BI DAX count function is

Measure Name = COUNT (Expression or Column Name)

Here, we create a measure (called CountSale) to count the number of numeric records in the New Sales column. And the Code is

CountSales = COUNT (EmployeeSales [NewSale])
power-bi-dax-aggregate-functions-10-3666636

Power BI DAX VAR.S function

The DAX VAR.S function finds the statistical variance of whole records. The syntax for the Power BI DAX VAR.S function is

Measure Name = VAR.S (Expression or Column Name)

Here, we create a measure (named VarSIncome) to find the statistical variance of a column of annual income. And the Code is

VarSIncome = VAR.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-11-1193406

Power BI DAX VAR.P function

The Power BI DAX VAR.P function finds the statistical variance of some selected records or. The syntax for the Power BI DAX VAR.P function is

Measure Name = VAR.P (Expression or Column Name)

Here, we create a Measure (name VarSIncome) to find the statistical variance P of a column of Annual Income. And the Code is

VarPIncome = VAR.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-12-4916976

Power BI DAX STDEV.P function

The DAX STDEV.P function finds the standard deviation of the selected records. The syntax for the Power BI DAX STDEV.P function is

Measure Name = STDEV.P (Expression or Column Name)

Here, we create a measure (called STDEVPIncome) to find the standard deviation of a column of annual income. And the Code is

StdevPIncome = STDEV.P (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-13-2831771

Power BI DAX STDEV.S function

The DAX STDEV.S function finds the standard deviation of whole records. The syntax for the Power BI DAX STDEV.S function is

Measure Name = STDEV.S (Expression or Column Name)

Here, we create the Measure (named STDEVSIncome) to find the standard deviation of a column of Annual Income. And the Code is

StdevSIncome = STDEV.S (EmployeeSales [YearlyIncome])
power-bi-dax-aggregate-functions-14-8733359

Let me create a new card for the standard device measurement

power-bi-dax-aggregate-functions-15-9735030

Power BI DAX MAX function example 2

The Power BI DAX MAX function also accepts two arguments. You can use this function to find the maximum value between those two. The syntax for the Power BI DAX MAX function is:

Measure Name = MAX (Expression1, Expression2)

Here, we create a new column (called MaxValue) to find the largest value between Sales and Average Sales. I suggest you refer to the Create a column article to understand the steps required to create a column.

power-bi-dax-aggregate-functions-16-4238102

Power BI DAX MIN function example 2

The Power BI DAX MIN function accepts two arguments. Use this Power BI MIN function to find the smallest value between two numbers. The syntax is:

Measure Name = MIN (Expression1, Expression2)

Here, we create a new column (named MinValue) to find the smallest value between Sales and Average Sales.

power-bi-dax-aggregate-functions-17-6913377

Let me add those two columns Maximum Value and Minimum Value to this table.

power-bi-dax-aggregate-functions-18-4411727
R Marketing Digital