VARX.S

VARX.S

How to Use the Power BI DAX function VARX.S

What is the VARX.S Function?

The VARX.S function is a statistical function that calculates the variance of a sample. Variance is a statistical measure that tells us how much the individual data points in a set deviate from the average of that set. A high variance means that the data is widely spread out, while a low variance means that the data is tightly clustered around the mean.

Syntax of the VARX.S Function

The syntax of the VARX.S function is as follows:


VARX.S(❰expression❱, ❰expression❱ [, ❰expression❱…] )


The first argument is the expression that you want to calculate the variance of. You can also include additional expressions to calculate the variance of multiple variables at once.

Example Usage

Suppose you have a table called Sales that contains the following columns:

- Product

- Sales Amount

- Region

You want to calculate the variance of sales amounts for each product in the North region. You can use the following DAX formula:


VARX.S(

FILTER(

Sales,

Sales[Region] = “North”

&& Sales[Product] = EARLIER(Sales[Product])

),

Sales[Sales Amount]

)


This formula uses the FILTER function to filter the Sales table to only include rows where the Region is "North" and the Product matches the current product. The EARLIER function is used to reference the current Product context. The VARX.S function then calculates the variance of the Sales Amount column for this filtered table.

In conclusion, the VARX.S function is a powerful tool for calculating the variance of a sample in Power BI. By using this function, you can gain a better understanding of how spread out your data is and identify any outliers or trends in your data. Use the examples and syntax provided in this article to get started with using the VARX.S function in your own Power BI reports.

Power BI DAX Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

Subject

Your Name (required)

Company/Organisation

Email (required)

Telephone

Training Course(s)

Your Message

Upload Example Document(s) (Zip multiple files)

Copyright, G Com Solutions Ltd, 2024.
Tower Bridge Business Centre, 46-48 East Smithfield, London E1W 1AW
0800 998 9248   |   9:00 a.m. till 5:30 p.m.

Connect With Me: