🔤 DAX Text Functions

Last Updated: 16th October 2025


Text Functions in DAX are used to work with string (text) values — like joining, trimming, converting case, or extracting part of a word.

These functions are very useful for cleaning or formatting text-based columns (like names, regions, IDs, etc.).

🗣 Hinglish Tip: Text functions ka kaam hota hai “string ke saath khelna” — jaise naam ke parts nikalna, combine karna ya uppercase banana.


✏ Common Text Functions in DAX

Let’s go through the most useful DAX text functions with examples 👇


1. CONCATENATE() – Join Two Texts

Combine two text values together.

-- CONCATENATE(text1, text2)
Full Name = CONCATENATE(Customer[FirstName], Customer[LastName])

🗣 Hinglish Tip: Agar beech me space chahiye to " " add karo.

-- CONCATENATE(text1, " " & text2)
Full Name = CONCATENATE(Customer[FirstName], " " & Customer[LastName])

2. CONCATENATEX() – Join Multiple Rows into One Text

Combine text values from multiple rows using a separator.

-- CONCATENATEX(text1, text2,text3,..more, separator)
Product List = CONCATENATEX(Products, Products[Name], ", ")

💡 Mostly used when you want all items in a single cell.

3. LEFT() ,RIGHT() and MID() – Extract Part of a Text

Extract the left, right or middle part of a text value.

-- LEFT(text, num_chars)
First Name = LEFT(Customer[Name], 5)

-- RIGHT(text, num_chars)
Last Name = RIGHT(Customer[Name], 5)

-- MID(text, start_pos, num_chars)
Middle Name = MID(Customer[Name], 6, 5)

4. LEN() – Get the Length of a Text

Get the number of characters in a text value.

-- LEN(text)
Name Length = LEN(Customer[Name])

5. REPLACE() – Replace Text in a Text

Replace a specific part of a text value with another text value.

-- REPLACE(old_text, start, num_chars, new_text)
REPLACE("PowerBI", 1, 5, "Excel")

6. SUBSTITUTE() – Replace word by match

Replace a specific word in a text value with another word.

-- SUBSTITUTE(text, old_text, new_text)
SUBSTITUTE("ABC Corp", "ABC", "XYZ")

🗣 Hinglish Tip: REPLACE() = position se change karo, SUBSTITUTE() = word match se change karo.


7. SEARCH() – Find Substring Position in a Text and it is case insensitive

-- SEARCH(find_text, within_text)
SEARCH("bi","PowerBI")

8. FIND() – Find Substring Position in a Text and it is case sensitive

-- FIND(find_text, within_text)
FIND("BI","PowerBI")

💡 Returns the position number where the substring starts.


9. UPPER()– Convert Text to Uppercase

-- UPPER(text)
Upper Name = UPPER(Customer[Name])

10. LOWER()– Convert Text to Lowercase

-- LOWER(text)
Lower Name = LOWER(Customer[Name])

💡 Useful for data cleaning — consistent name formats.


11. TRIM()– Remove Leading and Trailing Spaces

-- TRIM(text)
Trimmed Name = TRIM(Customer[Name])

Common Mistakes

  • Forgetting space in CONCATENATE() → "RaviKumar" instead of "Ravi Kumar"
  • Using + instead of & for text join → always use &
  • Case sensitivity: FIND() is sensitive, SEARCH() is not