Forum Discussion
Anonymous
3 years agoNot applicable
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 ...
- 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:
MFelix
3 years agoSuper User
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:
Anonymous
3 years agoNot applicable
Thank you for your help