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.

***** 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