/    /  Amazon QuickSight – stdevp

Amazon QuickSight – stdevp

 

The stdevp() function in Amazon QuickSight is a statistical function that calculates the sample standard deviation of a measure. Standard deviation is a measure of the amount of variation or dispersion of a set of values from the mean.

 

Syntax

#Start#
stdevp(measure, [group-by level])
#End#

 

This function takes the following arguments:

 

  • measure: This parameter specifies the measure for which you want to calculate the sample standard deviation. The measure can be a field or an expression.
  • [group-by level]: This parameter is optional and specifies the grouping level for which to calculate the sample standard deviation. If this parameter is not specified, the sample standard deviation is calculated for the entire dataset. If specified, the sample standard deviation is calculated for each group specified.

 

Suppose you have a sales dataset with the following fields: Date, Product, Sales, and Region. You can use the stdevp() function to calculate the sample standard deviation of sales for the entire dataset. Here’s an example formula:

 

Example

#Start#
stdevp(Sales)
#End#

 

This formula calculates the sample standard deviation of the Sales field for the entire dataset. This function can help you identify the level of variability of sales in the dataset.

 

You can also use the group-by parameter to calculate the sample standard deviation by region. Here’s an example formula:

 

Example

#Start#
stdevp(Sales)
#End#

 

This formula calculates the sample standard deviation of the Sales field for each region in the dataset. This function can help you identify which regions have higher or lower variability in sales compared to others. Note that if you want to calculate the population standard deviation, you should use the stdev() function instead.