# Left - script and chart function

Left() returns a string consisting of the first (leftmost) characters of the input string, where the number of characters is determined by the second argument.

Syntax:

Left(text, count)

Return data type: string

Arguments:

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

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

#### Example: Chart expression

| Example | Result |
| --- | --- |
| `Left('abcdef', 3)` | Returns 'abc' |

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

#### Example: Load script

```
T1:
Load 
*, 
left(Text,Start) as Left;        
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 LeftLeft function in the load script.

| Text | Start | Left |
| --- | --- | --- |
| abcdef | 3 | abc |
| 2021-07-14 | 4 | 2021 |
| 2021-07-14 | 2 | 20 |

See also [Index - script and chart function](https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions/Index.htm), which allows more complex string analysis.