Site icon i2tutorials

Amazon QuickSight – periodToDatePercentile

Amazon QuickSight – periodToDatePercentile

 

The ‘periodToDatePercentile()’ function is a statistical function in Amazon QuickSight that calculates the percentile of a measure for a given time period. This function is useful when you want to analyze how a measure changes over time and compare it to a certain percentile of data.

 

Syntax

#Start#
periodToDatePercentile(
    measure, 
    percentile, 
    dateTime, 
    period, 
    endDate (optional)
)
#End#

 

This function takes the following arguments:

 

 

Suppose you have a sales dataset with the following fields: Date, Product, Sales, and Region. You can use the periodToDatePercentile() function to calculate the 90th percentile of sales for the current day by region. Here’s an example formula:

Example

#Start#
periodToDatePercentile(Sales, 0.9, Date, 'day', now(), Region)
#End#

This formula calculates the 90th percentile of the Sales field for the current day, grouped by Region. The now() function is used to specify the current date and time as the end date. This function can help you identify the highest sales values for the day in each region and compare them to the 90th percentile of the data.

 

Exit mobile version