Amazon QuickSight
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


substring returns the characters in a string, starting at the location specified by the start argument and proceeding for the number of characters specified by the length arguments.


substring(expression, start, length)



An expression can be the name of a field that uses the string data type like address1, a literal value like 'Unknown', or another function like substring(field_name,0,5).


The character location to start from. start is inclusive, so the character at the starting position is the first character in the returned value.


The number of additional characters to include after start. length is inclusive of start, so the last character returned is length - 1 after the starting character.

Return Type



The following example returns the thirteenth through nineteenth characters in a string.

substring('Fantasy and Science Fiction',13,7)

The following value is returned.