The Power BI RIGHT function is one of the DAX text functions useful to return the given number of rightmost or last characters from the given string. This article explains the DAX RIGHT function that accepts the original text and the number of last characters(integer value) and the syntax is shown below:
RIGHT(<text>, <num_chars>)
text: The original string column that acts as the reference point to extract the last characters.
num_chars: It’s an optional argument and the default value is 1. If you specify any number, the DAX RIGHT function returns the mentioned last or rightmost characters from <text>. The RIGHT function on numeric columns converts them to text and returns the last characters. For instance, RIGHT(12345, 2) returns 45.
Power BI DAX RIGHT function Example
To demonstrate the DAX RIGHT() function, go to the Modeling Tab, click the New Column button, and rename it RightName. The below expression returns the last ten characters or letters from the FullName column.
Next, please add the RightName column to the table report. Please refer to the String and the function article for the remaining Power BI methods. For more Charts >> Click Here.
RightName = RIGHT(EmployeeEmails[FullName], 10)
The below Power BI DAX expression uses the FIND, LEN, and RIGHT functions to return the domain name (string after the @ symbol) in the Email address column.
RightEmail = RIGHT(EmployeeEmails[Email Adress], LEN(EmployeeEmails[Email Adress]) - FIND("@", EmployeeEmails[Email Adress]))