Amazon QuickSight – toUpper
The ‘toUpper()’ function in Amazon QuickSight is used to convert a string expression to uppercase. This function returns a new string with all the characters converted to uppercase.
Syntax
#Start# toUpper(expression) #End#
This function takes one argument:
- expression: This is the string expression that is to be converted to uppercase.
Suppose we have a dataset that contains information about employees’ names and their job titles. We can use the toUpper() function in Amazon QuickSight to convert the job titles to uppercase.
To convert the job titles to uppercase, we can create a new calculated field in Amazon QuickSight with the following expression:
Example
#Start# toUpper(job_title) #End#
This expression will convert all the job titles in our dataset to uppercase.
For instance, if our job title data is as follows:
| Name | Job Title |
| John Doe | manager |
| Jane Smith | assistant |
| Bob Johnson | analyst |
| Sally Lee | executive |
| Jim Brown | director |
Then, the job title data with uppercase converted will be:
| Name | Job Title | Job Title (toUpper) |
| John Doe | manager | MANAGER |
| Jane Smith | assistant | ASSISTANT |
| Bob Johnson | analyst | ANALYST |
| Sally Lee | executive | EXECUTIVE |
| Jim Brown | director | DIRECTOR |
In this example, we can see that the toUpper() function has converted all the job titles to uppercase, resulting in a cleaner and more consistent dataset.