Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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

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

List

%ROI
$Amt
CUnits

 

Hope this helps!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors