Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs

Power BI DAX Aggregate Functions

by suresh

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

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

Power BI DAX Aggregate Functions 1

Power BI DAX Aggregate Functions

The following examples show the list of DAX Aggregate Functions in Power BI

Power BI DAX Sum Function

The Power BI DAX Sum function calculates the total or Sum of records in a column. The Power BI DAX Sum Function syntax 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, please click on the New Measure option under the Power BI Home tab, or Modeling tab.

Power BI DAX SUM Function 2

We renamed the default measure name as Sales Sum. As you can see from the screenshot below, while I was typing, Power BI IntelliSense is showing the suggestions.

Let me select the Power BI DAX SUM function

Power BI DAX SUM Function 3

For the Power BI DAX Aggregate Functions demo purpose, we will calculate the Sum of Sales in this table

Power BI DAX SUM Function 4

By clicking the enter or any key, a new Measure called SalesSum created. And the final Code is

SalesSum = SUM(EmployeeSales[Sales])
Power BI DAX SUM Function 5

Let me create a Card using this Measure. Please refer to Create a Card and Format Card articles to understand the steps involved in creating and formatting cards.

Power BI DAX SUM Function 6

Power BI DAX Average Function

The Power BI DAX Average function is used to calculates the Average of records in a column. The Power BI DAX Average Function syntax is

Measure Name = AVERAGE(Expression or Column Name)

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

AVGSale = AVERAGE(EmployeeSales[Sales])
Power BI DAX AVERAGE Function 7

Next, let me create a Card using this Average Measure.

Power BI DAX MIN Function

The Power BI DAX MIN function finds the Minimum value in a column. The syntax of the Power BI DAX MIN Function is

Measure Name = MIN(Expression or Column Name)

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

MinSale = MIN(EmployeeSales[Sales])
Power BI DAX MIN Function 8

Next, let me create a Card using this Minimum Measure.

Power BI DAX MAX Function

The Power BI DAX MAX function finds the Maximum value in a column. The syntax of the Power BI DAX MAX Function is

Measure Name = MAX(Expression or Column Name)

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

MaxSale = MAX(EmployeeSales[Sales])
Power BI DAX MAX Function 9

Power BI DAX COUNT Function

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

Measure Name = COUNT(Expression or Column Name)

Here, we created a Measure (named as CountSale) to count the number of numeric records in the New Sales column. And the Code is

CountSales = COUNT(EmployeeSales[NewSale])
Power BI DAX COUNT Function 10

Power BI DAX VAR.S Function

The DAX VAR.S function finds the statistical Variance of complete records. The Power BI DAX VAR.S Function syntax is

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

Here, we created a Measure (named as VarSIncome) to find the statistical Variance of a Yearly Income column. And the Code is

VarSIncome = VAR.S(EmployeeSales[YearlyIncome])
Power BI DAX VAR.S Function 11

Power BI DAX VAR.P Function

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

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

Here, we created a Measure (name as VarSIncome) to find the statistical P Variance of a Yearly Income column. And the Code is

VarPIncome = VAR.P(EmployeeSales[YearlyIncome])
Power BI DAX VAR.P Function 12

Power BI DAX STDEV.P Function

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

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

Here, we created a Measure (named as STDEVPIncome) to find the standard deviance of a Yearly Income column. And the Code is

StdevPIncome = STDEV.P(EmployeeSales[YearlyIncome])
Power BI DAX STDEV.P Function 13

Power BI DAX STDEV.S Function

The DAX STDEV.S function finds the standard deviance of complete records. The  syntax of the Power BI DAX STDEV.S Function is

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

Here, we created the Measure (named as STDEVSIncome) to find the standard deviance of a Yearly Income column. And the Code is

StdevSIncome = STDEV.S(EmployeeSales[YearlyIncome])
Power BI DAX STDEV.S Function 14

Let me create a new card for the Standard Device Measure

Power BI DAX Aggregate Functions 15

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 Max value between those two. The Power BI DAX MAX function syntax is:

Measure Name = MAX(Expression1, Expression2)

Here, we created a new column (named as MaxValue) to find the largest value in-between the Sales and the Average Sales. I suggest you refer to Create a Column article to understand the steps involved in creating a column.

Power BI DAX MAX Function 16

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. Syntax is:

Measure Name = MIN(Expression1, Expression2)

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

Power BI DAX MIN Function 17

Let me add those two Max Value and Min Value columns to this table.

Power BI DAX MAX and MIN Function 18

Placed Under: Power BI

  • Install Power BI Desktop
  • Connect Power BI to SQL Server
  • Add Rename and Duplicate Pages
  • Connect to Multiple Excel Sheets
  • Get Excel Data to Power BI
  • Get Text File Data to Power BI
  • Load Data from Multiple Sources
  • Remove Power BI Table Columns
  • Create Power BI Bins
  • Power BI Joins
  • Change Column Data Types
  • Combine Multiple Tables
  • Power BI Clusters
  • How to Enter Data into Power BI
  • How to Format Dates in Power BI
  • Create Power BI Groups
  • Create Power BI Query Groups
  • Create Power BI Hierarchy
  • Power BI Pivot Table
  • Power BI Unpivot Table
  • Rename Power BI Table Names
  • Rename power bi column names
  • Split Columns in Power BI
  • Remove reorder power bi column
  • Power BI Area Chart
  • Format Power BI Area Chart
  • Power BI Bar Chart
  • Format Power BI Bar Chart
  • Power BI Clustered Bar Chart
  • Clustered Column Chart
  • Create a Power BI Card
  • Format Power BI Card
  • Create Power BI Multi-Row Card
  • Format Power BI Multi-Row Card
  • Power BI Column Chart
  • Format Power BI Column Chart
  • Power BI Donut Chart
  • Format Power BI Donut Chart
  • Power BI Funnel Chart
  • Format Power BI Funnel Chart
  • Power BI Heat Map
  • Power BI Line Chart
  • Format Power BI Line Chart
  • Line & Clustered Column Chart
  • Format Line & Clustered Column
  • Line & Stacked Column Chart
  • Format Line & Stacked Column
  • Power BI Matrix
  • Format Power BI Matrix
  • Power BI Table
  • Format Power BI Table
  • Add Data Bars to Power BI Table
  • Add alternate Table Row Colors
  • Power BI Pie Chart
  • Format Power BI Pie Chart
  • Power BI Ribbon Chart
  • Format Power BI Ribbon Chart
  • Power BI Treemap
  • Format Power BI TreeMap
  • Power BI Scatter Chart
  • Format Power BI Scatter Chart
  • Power BI Stacked Area Chart
  • Power BI Stacked Bar Chart
  • Format Stacked Bar Chart
  • Power BI Stacked Column Chart
  • Format Stacked Column Chart
  • Power BI Waterfall Chart
  • Format Power BI Waterfall Chart
  • Power BI 100% Stacked Bar Chart
  • 100% Stacked Column Chart
  • Create a Power BI Map
  • Format Power BI Map
  • Power BI Filled Map
  • Format Power BI Filled Map
  • Power BI Basic Filters
  • Power BI Slicer
  • Power BI Top 10 Filters
  • Power BI Drill through Filters
  • Power BI Filters on Measures
  • Power BI Advanced Filters
  • Power BI Report Level Filters
  • Power BI Page Level Filters
  • Power BI Calculated Columns
  • Add Conditional Column
  • Create Power BI Custom Column
  • Power BI Calculated Measures
  • Power BI Calculated Tables
  • Power BI DAX String Functions
  • Power BI DAX Math Functions
  • DAX Trigonometric Functions
  • Power BI DAX Date Functions
  • Power BI DAX Logical Functions
  • Power BI DAX Agg. Functions
  • Power BI Dashboard Introduction
  • Power BI Dashboard Settings
  • Power BI Dashboard Actions
  • Delete Power BI Dashboard
  • Subscribe Power BI Dashboard
  • Add Web Content to Dashboard
  • Add Image to Dashboard
  • Add video to power bi dashboard
  • Add Title to Power BI Dashboard
  • Pin Workbooks to Dashboard
  • Register to Power BI Service
  • Connect to Power BI Service
  • Create Power BI Workspace
  • Share Power BI Workspace
  • Create a Report in Workspace
  • Rename a Report in Workspace
  • Rename a Dataset in Workspace
  • Quick insights in Power BI
  • Get insights in Power BI
  • Publish power bi desktop report
  • Upload Power BI Workbooks
  • Upload Excel Files to Dashboard
  • Edit Power BI App
  • View Published Power BI App
  • Publish Power BI App
  • Share Power BI Dashboard
  • Share Power BI Workspace
  • Share Power BI Report
  • Power BI Q&A
  • Power BI Q&A Advanced
  • Customize Q&A Suggestions

Copyright © 2021 · All Rights Reserved by Suresh

About Us | Contact Us | Privacy Policy