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

Function Description
BLANK Returns a blank.
CODE Returns a numeric code for the first character in a text string.
CONCATENATE Joins two text strings into one text string.
CONCATENATEX Concatenates the result of an expression evaluated for each row in a table.
CONTAINSSTRING Returns TRUE or FALSE indicating whether one string contains another string.
CONTAINSSTRINGEXACT Returns TRUE or FALSE indicating whether one string contains another string.
EXACT Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
FIND Returns the starting position of one text string within another text string.
FIXED Rounds a number to the specified number of decimals and returns the result as text.
FORMAT Converts a value to text according to the specified format.
LEFT Returns the specified number of characters from the start of a text string.
LEN Returns the number of characters in a text string.
LOWER Converts all letters in a text string to lowercase.
MID Returns a string of characters from the middle of a text string, given a starting position and length.
REPLACE REPLACE replaces part of a text string, based on the number of characters you specify, with a different text string.
REPT Repeats text a given number of times.
RIGHT RIGHT returns the last character or characters in a text string, based on the number of characters you specify.
SEARCH Returns the number of the character at which a specific character or text string is first found, reading left to right.
SUBSTITUTE Replaces existing text with new text in a text string.
TRIM Removes all spaces from text except for single spaces between words.
UNICHAR Returns the Unicode character referenced by the numeric value.
UPPER Converts a text string to all uppercase letters.
VALUE Converts a text string that represents a number to a number.