String Manipulation in DAX: Mastering Text Functions in Power BI
- Bernard Kilonzo

- Jul 9
- 2 min read

Overview
Text functions are specialized functions used to create, manipulate, and analyze text (string) data within your reports and data models. They allow users to extract substrings, change text case, combine multiple text values, search for specific patterns, and perform various transformations on textual data, making it easier to clean, standardize, and present information for analysis.
Common DAX text functions include.
CONCATENATE: This function joins two text strings into one text string.
CONCATENATEX: This function concatenates the result of an expression evaluated for each row in a table.
COMBINEVALUES: This function joins two or more text strings into one text string.
FORMAT: This function converts a value to text according to the specified format.
FIXED: This function rounds a number to the specified number of decimals and returns the result as text.
LEN: This function returns the number of characters in a text string.
UPPER: This function converts a text string to all uppercase letters.
LOWER: This function converts all letters in a text string to lowercase.
REPLACE: This function replaces part of a text string, based on the number of characters you specify, with a different text string.
TRIM: This function removes all spaces from text except for single spaces between words.
LEFT: This function returns the specified number of characters from the start of a text string.
RIGHT: This function returns the specified number of characters from the end of a text string.
MID: This function returns a string of characters from the middle of a text string, given a starting position and length.
EXACT: This function compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise.
FIND: This function returns the starting position of one text string within another text string.
SEARCH: This function returns the number of the character at which a specific character or text string is first found, reading left to right.
SUBSTITUTE: This function replaces existing text with new text in a text string.
REPT: This function repeats text a given number of times.
VALUE: This function converts a text string that represents a number to a number.
UNICHAR: This function returns the Unicode character referenced by the numeric value.
UNICODE: This function returns the numeric code corresponding to the first character of the text string.
Use Cases for Text Functions
Text functions are incredibly versatile and often essential when working with messy, inconsistent, or unstructured data. Here are some of the most common use cases where they shine:
Cleaning and standardizing data (e.g., removing extra spaces, converting case).
Extracting specific information (e.g., area codes, file extensions).
Combining fields for labels or keys.
Searching for keywords or patterns within text fields etc.
Conclusion
Mastering text functions in Power BI is crucial for unlocking the full potential of your data. These functions not only streamline the data preparation process but also allow for richer, more dynamic reporting and analysis. As organizations continue to rely on diverse and often unstructured data sources, proficiency with text functions becomes a vital skill for any Power BI user aiming to deliver accurate, actionable, and visually compelling insights.
If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!
Thank you for reading!
