PowerBI - Remove the Special character and following number from a text field

I am trying to remove the Special Character(_)and the following number from the text String.

For Example, I have Columns looking like this in Table1.

Table1

Input Col 
Abc_1     
asd
fgh-abd_5
g_7

And my expected output is,

Input Col Output Col 
Abc_1     Abc
asd       asd
fgh-abd_5 fgh-abd
g_7       g

Upvotes: 0

Views: 4049

Answers (1)

user5226582
user5226582

Reputation: 1986

https://community.powerbi.com/t5/Desktop/Removing-text-after-character-or-between-characters/td-p/182257

Split = LEFT( 'Table1'[Column]; 
       SEARCH("_";'Table1'[Column]; 1; 
           LEN('Table1'[Column])-1
         )-1
     )

Upvotes: 1

Related Questions