ThisÂ Power BI tutorialÂ helps you to understand how to calculate standard deviation in Power BI measures.

Recently, I worked on a Power BI report where I needed to calculate the standard deviation in sales data using the STDEV.P() function, and I could do so successfully.

In this tutorial, we learned about the Power BI standard deviation measure and how to calculate standard deviation using the Power BI measure. Also, I will tell you how to calculate the standard deviation in Power BI Power Query.

## Standard Deviation in Power BI

In Power BI, standard deviation is a statistical measure that tells you how spread out your data is from the average (or mean) value. It helps you understand the variability within your dataset.

Power BIÂ **Standard Deviation** function syntaxes:

**Syntax – 1**:

`STDEV.P(<ColumnName>)`

**Where**:

**ColumnName**= The name of an existing column. It cannot be an expression.

It Returns the standard deviation of the entire population.

**Syntax – 2**:

`STDEV.S(<ColumnName>)`

**Where**:

**ColumnName**= The name of an existing column. It cannot be an expression.

It Returns the standard deviation of a sample population.

Let’s say you have a dataset of students’ test scores in a class. The average score tells you the typical performance, but the standard deviation tells you how much the scores vary from that average.

For example, if the average score is 70 with a standard deviation of 5, most scores are close to 70, and there’s not much difference between them. But if the standard deviation is 15, scores are more spread out. Some might be much higher than 70, and some might be much lower.

## How to Calculate Standard Deviation in Power BI Measure

Now, I will show you how to calculate standard deviation in power BI.

Here, I have a SharePoint list (**Orders**) that contains below columns with various data types:

Columns | Data Types |
---|---|

Order Date | Date and time |

Product Name | Single line of text |

Category | Single line of text |

Sub-Category | Single line of text |

Sales | Currency |

Profit | Currency |

Follow the below steps to calculate the standard deviation in Power BI

Now, I am creating for the sample population like you can create an entire population.

**1**. Open **Power BI Desktop** and load the data. Then, you see data in the **Data** pane.

**2**. Under the **Home** tab, click the **New measure**.

**3**. In the formula bar, put the below expression.

`Standard Deviation = STDEV.S(Orders[Sales])`

Where:

**Standard Deviation**= Name of the Measure**Orders**= Name of the Table**Sales**= Name of the Column

**4**. Click the **Home** tab -> Expand **Visual gallery**(black box) -> Click the **Card** visual.

**5**. Then, using the **+Add data** option, add the **Standard Deviation** into the **Data** field.

**6**. After that, you can see the standard deviation result in the Power BI Card visual.

This way, you can calculate the standard deviation in the Power BI measure.

## How to Calculate Standard Deviation in Power BI Power Query Editor

Now, we will see how to calculate standard deviation in Power Query Editor. I hope you load the data set.

**1**. Under the **Home** tab, click **Transform data**.

**2**. Select the column you want to calculate the standard deviation. In my case, Sales.

**3**. Goto **Transform** tab, expand **Statistics** and select **Standard Deviation**.

**4**. After that, you see the Standard Deviation of sales.

This way, you calculate the standard deviation in Power BI Power Query.

## Conclusion

I hope you follow all the steps to create a standard deviation in Power BI.

This tutorial taught us the standard deviation in Power BI and how to calculate standard deviation in Power BI measures. Additionally, we learned how to calculate the standard deviation in Power BI Power Query.

Furthermore, you may like some more Power BI articles:

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book **Microsoft Power Platform A Deep Dive.**Â She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.