# Right - script and chart function

Right() returns a string consisting of the last (rightmost) characters of the input string, where the number of characters is determined by the second argument.

Syntax:

Right(text, count)

Return data type: string

Arguments:

Arguments

| Argument | Description |
| --- | --- |
| text | The original string. |
| count | Defines the number of characters to be included from the rightmost part of the string text. |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Right.htm)

#### Example: Chart expression

| Example | Result |
| --- | --- |
| `Right('abcdef', 3)` | Returns 'def' |

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Right.htm)

#### Example: Load script

```
T1:
Load 
*, 
right(Text,Start) as Right;        
Load * inline [
Text, Start
'abcdef', 3
'2021-07-14', 4
'2021-07-14', 2
]; 	
```

Result

Qlik SenseQlik Sense table showing the output from using the RightRight function in the load script.

| Text | Start | Right |
| --- | --- | --- |
| abcdef | 3 | def |
| 2021-07-14 | 4 | 7-14 |
| 2021-07-14 | 2 | 14 |