
- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
DAX Text - LEFT function
Description
Returns the specified number of characters from the start of a text string.
Syntax
LEFT (<text>, <num_chars>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
text The text string containing the characters you want to extract, or a reference to a column that contains text. |
2 |
num_chars Optional. The number of characters you want LEFT to extract. If omitted, default is 1. |
Return Value
A text string.
Remarks
DAX works with Unicode and stores all characters as the same length. Therefore, a single function LEFT is enough to extract the characters.
If the num_chars argument is a number that is larger than the number of characters in the text string, DAX LEFT function returns the maximum characters available and does not raise any error.
Example
= CONCATENATE (LEFT([Product], 5), [No. of Units])
returns a calculated column with the first 5 characters of the Product value concatenated with the value in the No. of Units column in the same row.