Dax Function: Text Functions

Category: Text functions

In Power BI, TEXT functions are a set of DAX functions used to manipulate, format, and transform text strings. These functions enable users to extract, modify, and combine textual data, which is often crucial for creating meaningful and dynamic reports.

Purpose

To handle and manipulate textual data efficiently in Power BI models.

Common Use Cases

  • Formatting numbers and dates as text.
  • Extracting specific parts of strings.
  • Combining multiple text values.
  • Cleaning and standardizing textual data.
FunctionDescription
COMBINEVALUESMerges multiple text strings into a single text string.
CONCATENATECombines two text strings into one text string.
CONCATENATEXJoins the results of an expression calculated for each row in a table into a single text string.
EXACTCompares two text strings and returns TRUE if they are identical, or FALSE otherwise.
FINDRetrieves the starting position of one text string within another.
FIXEDRounds a number to a defined number of decimal places and outputs it as text.
FORMATConverts a value into text using a specified format.
LEFTExtracts a set number of characters from the beginning of a text string.
LENReturns the total number of characters in a text string.
LOWERTransforms all characters in a text string to lowercase.
MIDExtracts characters from the middle of a text string based on a specified start position and length.
REPLACESubstitutes part of a text string with a new text string, based on a specified number of characters.
REPTDuplicates a text string a defined number of times.
RIGHTExtracts the last characters from a text string based on the specified number of characters.
SEARCHIdentifies the position of a specific character or text string within another, scanning left to right.
SUBSTITUTESwaps specific text in a text string with new text.
TRIMEliminates all extra spaces from a text string, retaining only single spaces between words.
UNICHARGenerates the Unicode character for a given numeric value.
UNICODERetrieves the numeric Unicode value of the first character in a text string.
UPPERConverts all letters in a text string to uppercase.
VALUEConverts a text string that represents a number into a numeric value.

Maximize the potential of Power BI and enhance your data insights with our expert consulting services. Whether you’re looking for assistance with advanced DAX functions, help designing interactive dashboards, or support in optimizing your data models for better performance, our skilled Power BI consultants are ready to provide tailored solutions for your business. Visit our Power BI consultancy page to learn more about how we can empower your organization to make more informed, data-driven decisions.

1. What are TEXT functions in Power BI?

TEXT functions in Power BI are DAX functions used to manipulate and format textual data, such as concatenation, extraction, and conversion.

2. How do I format a date using TEXT functions?

Use the FORMAT function, e.g., FORMAT(Today(), "MMMM DD, YYYY") to format a date as “February 10, 2025.”

3. Can TEXT functions handle numbers in Power BI?

Yes, functions like FORMAT can convert numbers into formatted strings (e.g., currency, percentages).

4. What is the difference between CONCATENATE and CONCATENATEX?

CONCATENATE joins two strings, while CONCATENATEX is used for concatenating values from a table or column with a delimiter.

5. Are TEXT functions case-sensitive?

Some functions like SEARCH are not case-sensitive, but you can use UPPER or LOWER to standardize case if needed.