What is the procedure for calculating standard deviation in Power BI, and can you provide an example?

The procedure for calculating standard deviation in Power BI involves the following steps:

1. Open the Power BI application and load the data set that you want to analyze.

2. Create a new measure by clicking on the “New Measure” button in the “Home” tab.

3. In the formula bar, type in the following formula: “=STDEV.P(column name)” where “column name” is the name of the column containing the data for which you want to calculate the standard deviation.

4. Press enter to execute the formula and create the measure.

5. To view the result, add the measure to a visual in your report or dashboard.

An example of calculating standard deviation in Power BI would be to find the standard deviation of sales data for a certain product. You would create a new measure using the formula “=STDEV.P(Sales)” and add it to a visual to view the result. This will give you the standard deviation of the sales data for that product.

Calculate Standard Deviation in Power BI (With Example)


You can use the following syntax in DAX to calculate the standard deviation of values in a column:

Std Dev of Points = STDEV.P('my_data'[Points])

This particular example creates a new measure named Std Dev of Points that calculates the standard deviation of values in the Points column of the table named my_data.

Note that there are four different standard deviation functions you can use in DAX:

  • STDEV.P: Returns the population standard deviation of values in a column.
  • STDEV.S: Returns the sample standard deviation of values in a column.
  • STDEVX.P: Returns the population standard deviation for an expression evaluated row by row over a table.
  • STDEVX.S: Returns the sample standard deviation for an expression evaluated row by row over a table.

The following example shows how to calculate the standard deviation of a column in Power BI in practice.

Related:

Example: How to Calculate Standard Deviation in Power BI

Suppose we have the following table in Power BI named my_data that contains information about points scored by basketball players on various teams:

Suppose we would like to calculate the standard deviation of values in the Points column.

To do so, click the Table tools tab along the top ribbon, then click the New measure icon:

Then type in the following formula into the formula bar:

Std Dev of Points = STDEV.P('my_data'[Points])

This will create a new measure named Std Dev of Points that contains the standard deviation of values in the Points column of the table:

Power BI calculate standard deviation

This will produce the following card that displays the standard deviation of values in the Points column of the table:

We can see that the standard deviation of values in the Points column is 6.83.

If we click on any of the individual names in the Team column of the table in the report, then the card will automatically update to show the standard deviation of points for that particular team.

For example, suppose we click the Mavs team name in the table:

The card automatically updates to show that the standard deviation of values in the Points column for the Mavs is 2.59.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x