SUBSTITUTE is a DAX function that replaces existing text with new text within a text string.
Syntax
SUBSTITUTE(
Text,
OldText,
NewText,
InstanceNumber
)
| Argument | Properties | Description |
|---|---|---|
| Text | A string of text, or a reference to a cell containing text, in which you want to substitute characters. | |
| OldText | The existing text you want to replace. If the case of old_text does not match the case in the existing text, SUBSTITUTE will not replace the text. | |
| NewText | The text you want to replace old_text with. | |
| InstanceNumber | Optional | The occurrence of old_text you want to replace. If omitted, every instance of old_text is replaced. |