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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
StrPod
Frequent Visitor

Fastest function to bulk replace different values in a single column?

I have a large data set and I there is a particular column that always has typos and I don't have access to the source. In PQ there several ways to replace values in a column, but I want to know which one is the fastest? I have seen folks using the gui "replace values" to list.accumulate to list.replacematchingitems and many more.. 

 

Also does it help if I sort the values before doing the replace operation?

2 REPLIES 2
Anonymous
Not applicable

Hi @StrPod 

 

Mostly the purpose of using functions like list.accumulate and list.replacematchingitems and many other functions is to simplify the M codes, or to make some replacements more dynamic without spending too much time modifying code manually and repeatedly. This doesn't guarantee that it will run faster, but more often than not, it's meant to make it faster and easier to maintain the code.

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

dufoq3
Super User
Super User

Hi. No sort doesn't speed replace. To answer your question: you should to try which one is fastest.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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