Search

Search Scripts

Scripting Reference Guides

Rick W

Tableau SQL Statistical Functions

Extracting insightful information through statistical functions within Tableau.


A. AVG:

Average Sales = AVG(Sales.Amount)

This example computes the average value of the Amount column in the Sales table, yielding the average sales amount.

B. MEDIAN:

Median Price = MEDIAN(Products.Price)

This example retrieves the median value from the Price column in the Products table, indicating the middle value when the values are sorted in ascending order.

C. STDEVP:

Population Standard Deviation = STDEVP(Sales.Quantity)

This example calculates the population standard deviation of the Quantity column in the Sales table, offering a metric for how dispersed the values are around the mean.

D. STDEV:

Sample Standard Deviation = STDEV(Sales.Revenue)

This example computes the sample standard deviation of the Revenue column in the Sales table, providing an estimation of the population standard deviation based on a sample.

E. VARP:

Population Variance = VARP(Orders.Amount)

This example determines the population variance of the Amount column in the Orders table, measuring the average squared deviation from the mean.

F. VAR:

Sample Variance = VAR(Orders.Quantity)

This example computes the sample variance of the Quantity column in the Orders table, offering an estimate of the population variance based on a sample.

Previous Article Power BI DAX Reference
Next Article Tableau BI Aggregation Functions
Print
218