/    /  Amazon QuickSight – toString

Amazon QuickSight – toString

 

The ‘toString()’ function in Amazon QuickSight is used to convert an expression to a string. It takes one parameter: the expression to be converted.

 

Syntax

#Start#
toString(expression)
#End#

 

This function takes one argument:

 

  • expression:  Expression is the value to be converted to a string. The toString() function returns a new string that represents the input expression.

 

Suppose we have a table with the following values:

 

NameAgeGender
John30Male
Jane25Female
Michael35Male

 

To convert the age values to strings, we can use the toString() function as follows:

 

Example

#Start#
toString({Age})
#End#

 

This will return the following output:

"30"
"25"
"35"

 

Note that the toString() function can be used to convert any expression to a string, including numbers, dates, and Boolean values. However, if the expression is already a string, the toString() function has no effect.