Site icon i2tutorials

Amazon QuickSight – varIf

Amazon QuickSight – varIf

 

The varIf() function in Amazon QuickSight is used to calculate the variance of a measure in a dataset, filtered by a set of conditions. Variance is a statistical measure that indicates how much the values in a dataset vary from the mean value.

 

Syntax

#Start#
varIf(measure, conditions)
#End#

 

This function takes the following arguments:

 

 

 

Suppose you have a sales dataset with the following fields: Date, Product, Sales, and Region. You want to calculate the variance of sales for all sales that occurred in the West region. Here’s an example formula:

 

Example

#Start#
varIf(Sales, Region = 'West')
#End#

 

This formula calculates the variance of the Sales field for all sales that occurred in the West region.

 

Exit mobile version