Reply
GiuseppeSan
New Member
Partially syndicated - Outbound

Replace all occurrences of a text between two custom delimiters

Hello everyone,
I am using this formula to delete the text between the two delimiters.

 

    #"Rimosso contenuto span" = Table.TransformColumns(#"Rimosso contenuto h4", {{"Descrizione", each Text.Replace(_, Text.BetweenDelimiters(_, "<span", ">"), ""), type text}}),

 

The replacement does not occur for all occurrences in the field, but only for the first one that is found.

How can I improve the formula to replace all occurrences?

Thank you,
g.

2 REPLIES 2
JoeBarry
Solution Sage
Solution Sage

Syndicated - Outbound

Hi @GiuseppeSan 

 

Are you highlighting the whole column before replacing the value? If you just chose one cell and carried out the replacemnet, then it will only change cells that are exactly that value, whereas if you choose the whole column or highlight multiple  columns it will remove this from all cells which have the value.

 

Thanks

Joe

Syndicated - Outbound

Hi @JoeBarry ,

function replaces only the first occurrence of the single cell.

 

g.

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)