# Right - 脚本和图表函数

Right() 用于返回特定字符串，其中包含输入字符串末尾（最右边）的字符，其中字符数量由第二个参数决定。

语法：

Right(text, count)

返回数据类型： 字符串

参数：

参数

| 参数 | 描述 |
| --- | --- |
| text | 原始字符串。 |
| count | 定义从字符串 text 最右侧开始包含的字符数。 |

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

#### 示例 - 图表表达式

| 示例 | 结果 |
| --- | --- |
| `Right('abcdef', 3)` | 返回 'def' |

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

#### 示例：加载脚本

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

结果

Qlik SenseQlik Sense 表显示了在加载脚本中使用 RightRight 函数的输出。

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