Cheat Sheets/Power BI/MID
DAX function

MIDDAX function reference

Characters from a position.

Syntax

dax
MID(<text>, <start_num>, <num_chars>)

Examples

dax
MID([Code], 4, 2)
A substring
dax
MID(Product[SKU], 5, 3)
A 3-character segment starting at position 5, e.g. an embedded plant code
dax
MID(Customer[Phone], LEN(Customer[Phone]) - 3, 4)
The last 4 digits, computed dynamically without hardcoding a start position

Common mistakes & gotchas

Related DAX functions

From Text

Used in these tutorials

← Back to the Power BI (DAX) cheat sheet