Introduction

Statistical functions are fundamental for analyzing and interpreting data in Power BI. In this hands-on Power BI tutorial, we'll explore how to use essential statistical functions in DAX that are commonly used for data analysis. Since this topic is relevant for the PL-300 exam, this guide will be a valuable resource for your preparation.

🧮 Overview of basic statistical functions

Let’s take a look at some of the most widely used statistical functions in DAX:

  • MIN(column)
    Calculates the smallest value (minimum) in a column.
  • MAX(column)
    Calculates the largest value (maximum) in a column.
  • AVERAGE(column)
    Calculates the mean (average) of a column, which is the sum of all values divided by the number of values.
  • MEDIAN(column)
    Calculates the median which is the middle value in a set of numbers when they are arranged in order from smallest to largest. If there is an even number of values, it returns the average of the two middle values.
  • STDEV.P(column)
    Calculates the standard deviation based on the entire population of data in a column, measuring the spread of values from the mean.
  • VAR.P(column)
    Calculates the square of the standard deviation (variance) based on the entire population of data in a column, measuring the spread of values from the mean in square units.
💡
For Standard Deviation and Variance, you also have the option to use STDEV.S() and VAR.S(). These functions calculate the  standard deviation and variance based on a subset of the data (sample), rather than the entire population. Use these functions when you want to estimate the variability of the entire population based on the sample data

📂 Data

Our sample data consists of a table named student, which contains student information.

🛠Use statistical functions in Power BI

The statistics function are applied to the column creditpoints. Let’s calculate a measure for each formula and see how each function works in practice.

MIN()

The Minimum of the column creditpoints is calculated as follows:

Min Credit Points = MIN(student[creditpoints])

The following value is returned:

MAX()

The Maximum of the column creditpoints is calculated as follows:

Max Credit Points = MAX(student[creditpoints])

The following value is returned:

AVERAGE()

The Average of the column creditpoints is calculated as follows:

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In