RIGHT DAX Function

The RIGHT function returns the last character or characters in a text string, based on the number of characters we specify.

DAX Syntax RIGHT(text, num_chars)

The function has the following parameters:
• text: The text string that contains the characters we want to extract, or a reference to a column that contains text.
• num_chars: The number of characters we want RIGHT to extract; is omitted, 1. We can also use a reference to a column that contains numbers.

Example: Returning a Fixed Number of Characters Create a Calculated column in the table. The following formula returns the last two digits of the Year of Passout column in the Sheet1 table.

DAX

Last two digits of Year column = RIGHT(Sheet1[Year of Passout],2)
RIGHT dax function