OpenBI Docs Buy

RIGHT

The last characters of a text (one by default).

Group: Text. Compatible with DAX.

Syntax

RIGHT ( <text> [, <num_chars>] )
ParameterTypeDescription
textTextThe text to take characters from; a number becomes text first.
num_charsWhole number
optional
How many characters to take from the end; 1 when left out.

Returns

Text. The last characters of the text.

Remarks

  • Asking for more characters than the text has gives the whole text.
  • A blank text gives BLANK. A negative number of characters is an error; a fraction is rounded, a half away from zero.
  • Characters are counted as DAX counts them, so most emoji take two.

Examples

The last characters

EVALUATE
ROW (
    "Four", RIGHT ( "Account 3000", 4 ),
    "Left out", RIGHT ( "abc" ),
    "More than there are", RIGHT ( "abc", 9 ),
    "Of a number", RIGHT ( 2026, 2 )
)
FourLeft outMore than there areOf a number
3000cabc26

LEFT, MID, LEN, SEARCH.

Last updated · OpenBI Studio 0.3.74