Forum Discussion
deepak91g
Resolver II
8 years agoSplit (left) a text column based on '-' or '_' as Delimiter?
I would like to achieve this task. I tried using split columns http://prntscr.com/ibe7hy
| Input | Output |
| A_B | A |
| AB_C | AB |
| AC-D | AC |
| ABC-E_C | ABC |
| AC_E-D | AC |
You could also use a formula like;
Column x = left(SUBSTITUTE(Table6[Column1],"-","_"),FIND("_", SUBSTITUTE(Table6[Column1],"-","_"),1,LEN(SUBSTITUTE(Table6[Column1],"-","_"))+1)-1)able6[Column1],"-","_"))+1)-1)gooranga1 Thanks for suggestion and giving an idea to approach this problem.
with some changes, this worked for me
left(SUBSTITUTE(ad_word_api_report_config[client_customer_name],"-","_"),FIND("_", SUBSTITUTE(ad_word_api_report_config[client_customer_name],"-","_"),1,LEN(SUBSTITUTE(ad_word_api_report_config[client_customer_name],"-","_"))+1)-1)
- Anonymous8 years ago
You can also use Splitter.SplitTextByAnyDelimiter({List of delimiters},Source)
list of delimiters can be {"&","/"}