Forum Discussion
Anonymous
8 months agoNot applicable
Remove string and parenthesis
Hi, I have a column with a number of different stores each ending with the area (these are different) in parenthesis. What I would like is to remove the parenthesis and the string within that. ...
- 8 months ago
Anonymous , Power Query -> Transform ->Extract -> Text before Delimiter
Dax
New column = Left([Column], Search("(", [Column],,0)) )
KarinSzilagyi
8 months agoSuper User
Hi Anonymous, there are two options to achieve this, depending on whether you want to cleanse it as a column in Power Query or extract it via DAX.
Power Query Editor:
- Transform > Extract > Text Before Delimiter
- Set the delimiter to " (" => this will keep the first part of your text until it encounters a space + parenthesis (works if the text you want to keep is always before the parenthesis:
DAX (Note: I renamed the table + column in this example, to make it easier to understand the formula):
Cleaned DAX = LEFT(ExampleTable[RawColumn], SEARCH(" (", ExampleTable[RawColumn])-1)