Home » DAX » DAX – RIGHT Function

DAX – RIGHT Function

RIGHT DAX Functions

Returns the specified number of characters from the end of a text string. It comes under Text function Dax category.

Syntax:

RIGHT(<Text> , <NumberOfCharacters> )




Description:

S no. Parameter Description
1 Text The text string containing the characters you want to extract.
2 NumberOfCharacters This is Optional, The number of characters you want to extract. If omitted, default is 1.

Let’s start with an example:

Step-1: Sample Dataset as below:

Sample Dataset for DAX String Functions

Sample Dataset for DAX String Functions





Step-2: Create a New column, right click on dataset & click on New column.

Create New Column

Create New Column

Step-3: Now, let’s write the RIGHT DAX function with one parameter. This function returns the rightmost character from the specified text, given the length of 1 character

Right_Default = RIGHT(Orders[Product Sub-Category])





Step-4:  Add another column and use the “RIGHT” DAX function with two parameters. This function will return the last 5 characters from the right side of the text.

Right_With_Position = RIGHT(Orders[Product Sub-Category],5)

Step-5:Drag both of the new columns to the table visual and observe the resulting output.

Right DAX Function Example

Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.




Recommended DAX Post:

LEFT

LOWER

UPPER

ALLEXCEPT

UNION

DATATABLE

ALLSELECTED

ALL

ADDCOLUMNS

Leave a Reply