A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
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.