Site icon i2tutorials

Amazon QuickSight – Extract

Amazon QuickSight – Extract

 

The extract function in Amazon QuickSight is used to extract a specific component or part of a date value. The function takes two arguments: a required period parameter specifying the component you want to extract, and a required date parameter specifying the date value from which you want to extract the component.

Syntax

#Start#
extract(period, date)
#End#

 

This function takes three arguments

 

 

 

 

 

 

For example, if you have a data set that includes a column for order dates and you want to create a new column that shows the month component of each order date, you can use the extract function to perform the extraction.

Example

#Start#
extract(MONTH, OrderDate)
#End#

 

This expression would extract the month component from the OrderDate field and return the result in the new column. The result would be a numeric value between 1 and 12, indicating the month of the order date.

 

Exit mobile version