RIGHT DAX Function (Text)
Returns the specified number of characters from the end of a text string.
Syntax
Parameter | Attributes | Description |
---|---|---|
Text |
The text string that contains the characters you want to extract. |
|
NumberOfCharacters | Optional |
The number of characters you want to extract; if omitted, 1. |
Return values
A text string containing the specified right-most characters.
» 2 related functions
Examples
-- LEFT, RIGHT, MID and LEN are the basic string-manipulation functions DEFINE VAR Val = "DAX is so cool!" EVALUATE { ( "LEFT ( Val, 3 ) ", LEFT ( Val, 3 ) ), ( "RIGHT ( Val, 5 )", RIGHT ( Val, 5 ) ), ( "MID ( Val, 11, 4 )", MID ( Val, 11, 4 ) ), ( "LEN ( Val )", LEN ( Val ) ) }
Value1 | Value2 |
---|---|
LEFT ( Val, 3 ) | DAX |
RIGHT ( Val, 5 ) | cool! |
MID ( Val, 11, 4 ) | cool |
LEN ( Val ) | 15 |
Related articles
Learn more about RIGHT in the following articles:
-
From SQL to DAX: String Comparison
In DAX string comparison requires you more attention than in SQL, for several reasons: DAX doesn’t offer the same set of features you have in SQL, a few text comparison functions in DAX are only case-sensitive and others only case-insensitive,… » Read more
Related functions
Other related functions are:
Last update: Oct 3, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/right-function-dax