Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Power Query : Extract text before delimiter with condition

Hi,   I have the Name column and would like to extract it as the Expecting Name (Result):    Name Expecting Name  AZER.SDD AZER AZEDT.FV AZEDT AZERZ.cFS AZERZ VSFS.DFS VSFS ...
  • MFelix's avatar
    3 years ago

    Hi Anonymous ,

     

    Do the TextBeforeDelimiter option and then change the code to:

    = Table.AddColumn(Source, "Text Before Delimiter", each if Text.Start([Name], 2) = "12" then [Name] else Text.BeforeDelimiter([Name], "."), type text)

     

    Has you can see the part of the split is updated to an IF statement: