Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.4 Text Functions: CONCATENATE, LEFT, RIGHT, MID

Lesson 25 of 62 in the free Power BI notes on Siksha Sarovar, written by Rohit Jangra.

DAX Text Functions

Text functions allow you to manipulate, extract, and combine text (string) values in your data model.

CONCATENATE()

Joins two text strings into one.

Syntax: CONCATENATE(Text1, Text2)

Example:

Full Name = CONCATENATE(Employees[FirstName], CONCATENATE(" ", Employees[LastName]))

Simpler Alternative — using & operator:

Full Name = Employees[FirstName] & " " & Employees[LastName]

CONCATENATEX()

Concatenates values from a column across all rows, with a delimiter.

Syntax: CONCATENATEX(Table, Expression, Delimiter)

Example:

Product List = CONCATENATEX(Products, Products[ProductName], ", ")

Result: "Laptop, Mouse, Keyboard, Monitor"

LEFT()

Extracts a specified number of characters from the start (left side) of a text string.

Syntax: LEFT(Text, NumberOfCharacters)

Example:

Area Code = LEFT(Customers[Phone], 3)

"9876543210" → "987"

RIGHT()

Extracts a specified number of characters from the end (right side) of a text string.

Syntax: RIGHT(Text, NumberOfCharacters)

Example:

Last 4 Digits = RIGHT(Customers[Phone], 4)

"9876543210" → "3210"

MID()

Extracts characters from the middle of a text string, starting at a specified position.

Syntax: MID(Text, StartPosition, NumberOfCharacters)

Example:

Middle Part = MID(Products[SKU], 4, 5)

"ABC12345XYZ" → "12345"

Other Useful Text Functions

FunctionDescriptionExample
LEN()Returns the length of a stringLEN("Hello") → 5
UPPER()Converts text to uppercaseUPPER("hello") → "HELLO"
LOWER()Converts text to lowercaseLOWER("HELLO") → "hello"
TRIM()Removes leading/trailing spacesTRIM(" Hi ") → "Hi"
SUBSTITUTE()Replaces occurrences of a substringSUBSTITUTE("ABC", "B", "X") → "AXC"
REPLACE()Replaces characters at a specific positionREPLACE("ABCDE", 2, 3, "XY") → "AXYE"
SEARCH()Finds position of a substring (case-insensitive)SEARCH("world", "Hello World") → 7
FIND()Finds position of a substring (case-sensitive)FIND("W", "Hello World") → 7
FORMAT()Formats a value as textFORMAT(1234.5, "#,##0.00") → "1,234.50"
BLANK()Returns a blank valueUsed in IF() for empty results

Practical Example: Formatting Display Values

Sales Display =
FORMAT([Total Sales], "$#,##0") & " (" &
FORMAT([Sales Growth], "0.0%") & " growth)"

Result: "$125,000 (12.5% growth)"