Site icon i2tutorials

Amazon QuickSight – percentOfTotal

Amazon QuickSight – percentOfTotal

 

The percentOfTotal function in Amazon QuickSight is used to calculate the percentage of a measure’s value relative to the total value of the measure. This function is useful when you want to see the contribution of a specific value to the overall total value.

 

Syntax

#Start#
percentOfTotal (
    measure, 
    [partition_field, ...]
)
#End#

 

This function takes the following arguments:

 

 

 

Suppose you have a dataset containing sales data for different products, and you want to see the percentage of total sales for each product. You can use the percentOfTotal function to achieve this as follows:

 

Example

#Start#
percentOfTotal(sales, {product})
#End#

 

This will calculate the percentage of total sales for each product, partitioned by product. The result will be displayed as a percentage value in a table or visualization.

 

Exit mobile version