RIGHT
A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
What is the RIGHT Function?
The RIGHT function is a DAX function that is used to extract a specified number of characters from the right side of a text string. It returns a new text value that contains the extracted characters. The basic syntax of the RIGHT function is as follows:
RIGHT(❰text❱, ❰num_chars❱)
Here, `❰text❱` is the text string that you want to extract characters from, and `❰num_chars❱` is the number of characters you want to extract.
How Does the RIGHT Function Work?
The RIGHT function works by extracting a specified number of characters from the right side of a text string. For example, if you have a text string "Power BI is awesome", and you want to extract the last four characters "some", you can use the RIGHT function with the following formula:
RIGHT(“Power BI is awesome”, 4)
The function will return the text value "some".
How to Use the RIGHT Function in Power BI
To use the RIGHT function in Power BI, you can follow these steps:
1. Open the Power BI Desktop application and create a new report.
2. Select the table or column where you want to use the RIGHT function.
3. Click on the "New Column" button in the "Modeling" tab.
4. In the formula bar, type the following formula:
New Column Name = RIGHT(❰text❱, ❰num_chars❱)
Here, `❰text❱` is the name of the column you want to extract characters from, and `❰num_chars❱` is the number of characters you want to extract.
5. Press Enter to create the new column.
6. The new column will appear in the "Fields" section.
7. Drag and drop the new column to the report canvas to use it in your visualizations.
Tips for Using the RIGHT Function Effectively
Here are some tips that can help you use the RIGHT function effectively in your Power BI reports:
- Use the RIGHT function to extract specific parts of a text string, such as dates or codes.
- Combine the RIGHT function with other DAX functions, such as FIND or LEN, to extract more complex patterns.
- Use the RIGHT function in conjunction with other visualizations, such as tables or charts, to analyze your data in different ways.
- Test your formulas thoroughly before using them in production to ensure that they are accurate and reliable.
The RIGHT function is a powerful DAX function that can be used to extract a specified number of characters from the right side of a text string. By following the steps outlined in this article, you can start using the RIGHT function in your Power BI reports and gain greater insights into your data. Remember to test your formulas thoroughly and use the RIGHT function in conjunction with other DAX functions and visualizations to get the most out of your data.