MID DAX Function (Text)
Returns a string of characters from the middle of a text string, given a starting position and length.
Syntax
Parameter | Attributes | Description |
---|---|---|
Text |
The text string from which you want to extract the characters. |
|
StartPosition |
The position of the first character you want to extract. Positions start at 1. |
|
NumberOfCharacters |
The number of characters to return. |
Return values
A string of text of the specified length.
Examples
VAR SSN = "123-45-6789" VAR SecureSSN = "XXX-XX-" & MID ( SSN, 8, 3 ) & "X" RETURN SecureSSN -- Result is XXX-XX-678X
Related functions
Other related functions are:
Last update: Jan 11, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo, Naji El Kotob
MSDN documentation: https://docs.microsoft.com/en-us/dax/mid-function-dax