Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AMCMILLAN
Advocate I
Advocate I

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.

 eg. Store 1 (Cardiff) = Store 1
       Store 2 (Birmingham) = Store 2

etc

Any ideas how to do this?
Thanks

Alex

     

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AMCMILLAN , Power Query -> Transform ->Extract -> Text before Delimiter 

amitchandak_0-1765968526621.png


https://youtu.be/oGY4RoPKDOE

Dax 
New column = Left([Column], Search("(", [Column],,0)) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
KarinSzilagyi
Super User
Super User

Hi @AMCMILLAN, 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:
    KarinSzilagyi_0-1765968693183.png

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)

KarinSzilagyi_1-1765968937275.png

 



Did I answer your question? If so, please consider marking my response as the ‘Accepted Solution’ - it helps others with the same issue find the answer more easily!
amitchandak
Super User
Super User

@AMCMILLAN , Power Query -> Transform ->Extract -> Text before Delimiter 

amitchandak_0-1765968526621.png


https://youtu.be/oGY4RoPKDOE

Dax 
New column = Left([Column], Search("(", [Column],,0)) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank-you, I sent the request and then realised what I needed to do but thank-you for posting a reply.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.