### Understanding Basic Statistical Functions in the Context of Microsoft Power BI Data Analyst (PL-300)

Microsoft Power BI Data Analyst (PL-300) exam primarily covers how to translate business requirements into secure, scalable, and reliable solutions. It involves the use of Power BI, a robust data analysis tool to collate, analyze, visualize, and share data-driven insights. One essential aspect of data analysis is leveraging basic statistical functions. This article aims to provide an overview of some of the fundamental statistical functions available in Power BI.

#### 1. AVERAGE Function

AVERAGE is one of the most commonly used statistical functions in Power BI. It calculates the average of a set of numerical data. The AVERAGE function ignores text values and blank cells, focusing only on the numerical data input. As an example, if you have sales data and want to calculate the average sales, you can use the AVERAGE function as follows:

powerbi

AVERAGE = AVERAGE(‘Sales'[Sale Amount])

#### 2. COUNT Function

The COUNT function is used in Power BI to count the number of data points in a particular column or table. Unlike the AVERAGE function, the COUNT function considers text values, dates, and numbers but ignores blank cells. The COUNT function syntax is as follows:

powerbi

COUNT = COUNT(‘Table'[Column])

#### 3. MAX and MIN Functions

The MAX and MIN functions are used to find the maximum and minimum values in a set of data points, respectively. The MAX function returns the largest value in a set of data, while the MIN function returns the smallest value. The syntax for both functions is as follows:

powerbi

MAX = MAX(‘Table'[Column])

MIN = MIN(‘Table'[Column])

#### 4. STDEV.P and STDEV.S Functions

Standard deviation is a statistical measure that shows the dispersion of a dataset. Power BI provides two functions for calculating standard deviation- STDEV.P and STDEV.S. STDEV.P calculates standard deviation for an entire population, while STDEV.S calculates standard deviation for a sample. The syntax for both functions is as follows:

powerbi

STDEVP = STDEV.P(‘Table'[Column])

STDEVS = STDEV.S(‘Table'[Column])

#### 5. SUM and SUMX Functions

The SUM function adds all the numbers in a column, while the SUMX function returns the sum of an expression evaluated for each row in a table, then sums up those results. Here is an example of how to apply these functions:

powerbi

SUM = SUM(‘Sales'[Sale Amount])

SUMX = SUMX(‘Sales’, ‘Sales'[Qty]*’Sales'[Price])

By understanding and using these basic statistical functions, data analysts can extract meaningful insights from the data, which can be instrumental in decision-making processes. Accordingly, mastering these functions is beneficial for individuals preparing for the PL-300 Microsoft Power BI Data Analyst exam.

## Practice Test

### True or False: In terms of basic statistical functions, the COUNT function in Microsoft Power BI will not provide a count of all records in the dataset.

1) True

2) False

**Answer:** False

**Explanation:** The COUNT function provides the number of non-blank records in the dataset.

### Which of the following functions ignore blank rows?

a) SUM

b) COUNTA

c) COUNTBLANK

d) AVERAGE

e) MAX

**Answer:** a, b, d, and e

**Explanation:** The functions SUM, COUNTA, AVERAGE, and MAX all ignore blank rows when running their operations, while COUNTBLANK specifically counts the blank rows in a dataset.

### True or False: The MEDIAN function is available in Power BI to calculate the midpoint number in a group of numbers.

1) True

2) False

**Answer:** True

**Explanation:** The MEDIAN function returns the median or midpoint value in a group of numbers, or in other words, the number that has an equal amount of numbers above and below it.

### What does the MINA function in Power BI do?

a) Returns the smallest number in a data set.

b) Returns the largest number in a data set.

c) Returns the median number in a data set.

d) Returns the number excluding zero in a data set.

**Answer:** a. Returns the smallest number in a data set.

**Explanation:** The MINA function evaluates all records in a dataset and returns the smallest number.

### True or False: The STDEV.P function includes blank rows, text, and logical values in its calculation.

1) True

2) False

**Answer:** False

**Explanation:** The STDEV.P function is a statistical function that computes the standard deviation of a dataset based on the entire population and it excludes text, logical values, and blank rows.

### In Microsoft Power BI, the MAXX function ____.

a) Works on strings

b) Works on numbers

c) Works on dates

d) All of the above

**Answer:** d. All of the above

**Explanation:** MAXX can work on strings, numbers, and dates. It evaluates an expression for each row of a table and returns the maximum value.

### If we want to compare the average of a subset of data to the average of the entire dataset, which of the following functions should be used in Microsoft Power BI?

a) AVERAGEA

b) AVERAGEX

c) ALL

d) ALLEXCEPT

**Answer:** b. AVERAGEX

**Explanation:** The AVERAGEX function modifies the context in which data is evaluated, making it appropriate for comparing a subset to the entire data set.

### True or False: The GEOMEAN function in Power BI is used to calculate the square root of individual results

1) True

2) False

**Answer:** False

**Explanation:** The GEOMEAN function returns the geometric mean of an expression evaluated for each row in a table.

### Which of the following functions is used to ignore all filters that have been applied in the report?

a) ALL function

b) ALLSELECTED function

c) ALLEXCEPT function

d) None of the options

**Answer:** a. ALL function

**Explanation:** In Power BI, the ALL function is used to ignore all filters that have been applied across all the columns in the report.

### True or False: VAR function returns the variance of a sample data set.

1) True

2) False

**Answer:** True

**Explanation:** The VAR function calculates the variance for a sample of data in Power BI.

## Interview Questions

### What is the primary purpose of the COUNT() function in Power BI?

The COUNT() function in Power BI is used to count the number of rows in a table or column where the values are not blank.

### How does the DISTINCTCOUNT() function work in Power BI?

The DISTINCTCOUNT() function is used in Power BI to count the number of distinct values in a column.

### Which statistical function can you use to find the maximum value in a column in Power BI?

You can use the MAX() function to find the maximum value in a column in Power BI.

### What is the application of the MIN() function in Power BI?

The MIN() function in Power BI is used to find the smallest value in a column.

### In Power BI, how do you calculate the total sum of a column?

To calculate the total sum of a column in Power BI, the SUM() function is used.

### How does the AVERAGE() function work in Power BI?

The AVERAGE() function is used in Power BI to calculate the mean of all non-blank values in a column.

### How would you use the STDEV.P function in Power BI?

The STDEV.P function in Power BI is used to calculate the standard deviation of a population or the entire data set in a column.

### What is the difference between the STDEV.P and STDEV.S functions in Power BI?

While STDEV.P calculates the standard deviation using the entire data set or population, the STDEV.S function calculates the standard deviation using a sample of a population or data set.

### Can you use the COUNT() function on a column with blank values in Power BI?

No, the COUNT() function does not count the blank or empty values in a column. If you want to get the total number of rows including those with blank values, the COUNTA() function should be used.

### How is variance calculated in Power BI?

Variance in Power BI is calculated using the VAR.P or VAR.S function. VAR.P calculates the variance for an entire population while VAR.S calculates the variance for a sample.

### What do the PERCENTILE.INC and PERCENTILE.EXC functions represent in Power BI?

The PERCENTILE.INC function in Power BI calculates the Kth percentile of values in a range where K is between 0 and 1 inclusive. On the other hand, PERCENTILE.EXC calculates the Kth percentile of values in a range, where K is between 0 and 1 exclusive.

### How can you find the median of a set of numbers in Power BI?

You can find the median of a set of numbers in Power BI by using the MEDIAN() function.

### What is the COUNTAX function used for in Power BI?

The COUNTAX function is used in Power BI to count all non-blank rows in a column, or expressions that result in a non-blank.

### What does the RANKX function do in Power BI?

In Power BI, the RANKX function returns the rank of a number in a list of numbers for each row in the table.

### How do I use the SUMX function in Power BI?

The SUMX function in Power BI is used to return the sum of an expression evaluated for each row in a table.