Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Extract Text

Hi folks, I need some help. Need to extract a string from another string.  <SOME TEXT HERE> : It can be a great text or a simple text.   It can be in DAX or in Function M   TEXT Result ...
  • fhill's avatar
    fhill
    6 years ago

     

    You can Merge these all together with VAR or nested logic, but I've broken them out to show the thought process flow...

     
    Colon Search = FIND(":", Table1[TEXT],,1)
     
    1st Space after Colon = FIND(" ", Table1[TEXT], (Table1[Colon Search]+2) ,1)
     
    2nd Space after Colon = FIND(" ", Table1[TEXT], (Table1[1st Space after Colon]+1) ,1)
     
    Name = MID(Table1[TEXT],Table1[Colon Search]+1,[2nd Space after Colon]-Table1[Colon Search])