RIGHT

The RIGHT function extracts a number of characters from the end (from the right) of the text string passed as an argument.

Syntax

RIGHT(
    text,
    num_chars
)

Parameters
  • text: Text from which to extract the characters or name of the column that contains the text strings from which to extract.
  • num_chars: Number of characters to extract from the right of text.
Returned value

The RIGHT function returns a string of characters.

Additional Information

If the num_chars argument is greater than the length of the text string text, the function returns the full text (ie, the length of the value returned by the function is always limited by the length of the text string from which you want to extract).

RIGHT function: Example of use

If num_chars is zero, RIGHT returns an empty string. This empty string is not interpreted as a Blank by the ISBLANK function. Thus, the following table includes the Right 0 column that extracts zero characters from the right of the content of the Manufacturer column, and the Is blank column checks whether the content of the Right 0 column is Blank or not:

RIGHT function: Example of use

If num_chars is a negative value, the function returns an error.

Although Microsoft Excel includes RIGHT-equivalent functions designed to work with languages that use the one-byte character set (such as Spanish or English) and others to work with languages that use the two-byte character set (so-called DBCS -Double Byte Character Set-, including Japanese, Simplified and Traditional Chinese, and Korean) -RIGHT and RIGHTB functions, respectively-, DAX uses the UNICODE format and stores all characters with the same length, so a single version of the RIGHT function is sufficient.

Related functions
Category
Text
Submitted by admin on Mon, 12/03/2018 - 23:38