Text Functions

Data Analysis Expressions (DAX) includes a set of text functions based on the library of string functions in Excel, but which have been modified to work with tables and columns in tabular models. This section describes text functions available in the DAX language.

In this category

BLANKReturns a blank.
CODEReturns a numeric code for the first character in a text string.
CONCATENATEJoins two text strings into one text string.
CONCATENATEXConcatenates the result of an expression evaluated for each row in a table.
CONTAINSSTRINGReturns TRUE or FALSE indicating whether one string contains another string.
CONTAINSSTRINGEXACTReturns TRUE or FALSE indicating whether one string contains another string.
EXACTCompares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
FINDReturns the starting position of one text string within another text string.
FIXEDRounds a number to the specified number of decimals and returns the result as text.
FORMATConverts a value to text according to the specified format.
LEFTReturns the specified number of characters from the start of a text string.
LENReturns the number of characters in a text string.
LOWERConverts all letters in a text string to lowercase.
MIDReturns a string of characters from the middle of a text string, given a starting position and length.
REPLACEREPLACE replaces part of a text string, based on the number of characters you specify, with a different text string.
REPTRepeats text a given number of times.
RIGHTRIGHT returns the last character or characters in a text string, based on the number of characters you specify.
SEARCHReturns the number of the character at which a specific character or text string is first found, reading left to right.
SUBSTITUTEReplaces existing text with new text in a text string.
TRIMRemoves all spaces from text except for single spaces between words.
UNICHARReturns the Unicode character referenced by the numeric value.
UPPERConverts a text string to all uppercase letters.
VALUEConverts a text string that represents a number to a number.

***** Related Blog Posts *****
60 Page DAX Formula Reference Guide Download Now Available
Show Only Top Or Bottom Results Using Ranking Formula Techniques – Power BI & DAX

***** Related Video Tutorials *****
Ultimate Beginners Guide to DAX

What Is DAX? & Why Do You Need To Learn It – (1.2) Ultimate Beginner Guide to DAX
Formula Syntax, Comments & Variables – (1.6) Ultimate Beginners Guide to DAX
Examples Of Advanced DAX – (1.18) Ultimate Beginners Guide to DAX

***** Related Course Modules *****
Ultimate Beginners Guide to DAX
Mastering DAX Calculations
Solving Analytical Scenarios w/ Power BI and DAX
DAX Formula Deep Dives
Advanced DAX Combinations

***** Related Support Forum Posts*****
Mastering DAX Calculations: What Is DAX?
Understanding DAX Formula
Developing Complex Dax functions
Data Types And Operators


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide