Site icon i2tutorials

Amazon QuickSight – Right

Amazon QuickSight – Right

 

The right function in Amazon QuickSight returns a specified number of characters from the right side of a string expression.

 

Syntax

#Start#
right(expression, limit)
#End#

 

This function takes two arguments:

 

 

Suppose you have a dataset containing a field with a string expression that you want to extract the last few characters from.

 

Assume the following dataset:

 

ItemDescription
AppleFresh apples
BananaRipe bananas
OrangeSweet oranges
PearJuicy pears

 

To extract the last 3 characters of the Description field, you can use the right function:

 

 

Example

 

#Start#
right({Description}, 3)
#End#

 

This expression extracts the last 3 characters from the Description field. The resulting calculated field will contain the extracted characters.

 

 

After creating this calculated field, you can use the extracted characters for visualizations and analysis. In this example, the calculated field would have the following values:

 

ItemDescriptionLast 3 Characters
AppleFresh applesles
BananaRipe bananasnas
OrangeSweet orangesges
PearJuicy pearsars

 

Note that the “Last 3 Characters” column is a calculated field, and the values are not stored in the original dataset.

 

Exit mobile version