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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GiuseppeSan
New Member

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

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

Hi @JoeBarry ,

function replaces only the first occurrence of the single cell.

 

g.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.