cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sifar786 Member
Member

Replace Values in a List found after Delimiter

I am stuck with a problem where i am trying to replace List values found after a specific delimiter say"~" with blank.

 

= List.ReplaceValue(Custom1, each Text.AfterDelimiter(_, "~"), "" , Replacer.ReplaceText)

where Custom1 is my list which looks like this:

List

%ROI~Latest 4 Wks - W/E 08/31/19
$Amt~Latest 4 Wks - W/E 08/31/19
CUnits~Latest 4 Wks - W/E 08/31/19

 

 

I want the list to like below, stripping the text properly (including the "~" sign).

List

%ROI
$Amt
CUnits

 

But i get the same List back, which means it is either not able to find each value in list or something else is missing!

List

%ROI~Latest 4 Wks - W/E 08/31/19
$Amt~Latest 4 Wks - W/E 08/31/19
CUnits~Latest 4 Wks - W/E 08/31/19

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
sifar786 Member
Member

Re: Replace Values in a List found after Delimiter

Ok, i found the simple solution myself using List.Transform. 🙂

= List.Transform(Custom1, each Text.BeforeDelimiter(_, "~"))

List

%ROI
$Amt
CUnits

 

Hope this helps!

View solution in original post

1 REPLY 1
Highlighted
sifar786 Member
Member

Re: Replace Values in a List found after Delimiter

Ok, i found the simple solution myself using List.Transform. 🙂

= List.Transform(Custom1, each Text.BeforeDelimiter(_, "~"))

List

%ROI
$Amt
CUnits

 

Hope this helps!

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)