I just stumbled upon this at the perfect time, I needed a solution worked out in two days and this was it, thank you so much!
@jerrydellasala76432 жыл бұрын
Chandoo - great video as always! The fix for the bug that repeats the first part of an M code function (the part before the period) is to type the function WITHOUT the period. Note, that the bug (in the latest beta version of 365) is only in the dialog box when using the tools in the ribbon. The Advanced Editor no longer has the bug. So, in the Add Custom Column dialog box if you type "listacc" and hit [TAB], "List.Accumulate" will appear. If you had typed "list.acc", you'd get "listList.Accumulate". Hopefully they'll fix the bug in the dialog box soon!
@chandoo_2 жыл бұрын
Good point Jerry. Another option I found is instead of pressing TAB if I press ENTER the autosuggest seems to do what it should.
@MohanYGK2 жыл бұрын
Uff, you made my life simple. Thanks Chandoo Ji
@chandoo_4 жыл бұрын
I posted a companion article on this. Check it out for more + sample file here: chandoo.org/wp/multiple-find-replace-list-accumulate/
@wayneedmondson10654 жыл бұрын
Thanks Chandoo.. interesting challenge and technique for solving it. Will have to study further. Thanks for sharing it! Thumbs up!!
@chandoo_4 жыл бұрын
Thanks Wayne..
@theexcelwizard235 ай бұрын
This helped me today, thanks!
@msoffice60374 жыл бұрын
PERFECT EXPLANATION of List.Accumulate !!! Could you, please, make a video about List.Generate?
@chandoo_4 жыл бұрын
Thanks for the love. I will add a video on List.Generate in a while. I am looking for a practical application for this. If you have any suggestions, please comment.
@msoffice60374 жыл бұрын
@@chandoo_ If I knew List.Generate:)
@priyakishan3 жыл бұрын
Awesome work. You made my life damn easy. Thanks a TON
@vikramraghuwanshi94554 жыл бұрын
Outstanding as wellas mindblowing techniques for find as wellas repalce fora multile times.
@orasha48469 ай бұрын
I am trying to work out how this could work if you had multiple columns as conditions. Would I have to use a helper column where concatenate the columns?
@JonathanExcels4 жыл бұрын
Less than a month ago I was looking to do something similar. In my situation I had headers like column01, column02....column 21. I thought there must be a better way than manually retyping each column name.
@lailahugrass49042 жыл бұрын
Thank you for this, you gave a really nice explanation. I'd also appreciate tips or work arounds to speed this up :)
@GenNextAnalyst2 жыл бұрын
First of all, thanks for the tutorial. It's very useful. However, I have 1 question, I am trying to replace 1800 over rows to standardised naming convention but it takes so long. Is there a way to speed it up? Thanks !
@hudzaifahhudzaifah-zv6yw11 ай бұрын
Do you find other solution brother? I tried on my 5000+ rows and face the same problem. Thanks
@patrickbcox3 жыл бұрын
Excellent! Exactly what I needed. New follower here. :). Thanks!!
@chandoo_3 жыл бұрын
Welcome aboard Patrick. :)
@sandeepkumarkonagalla44112 жыл бұрын
Hi @Chandoo Thanks for the video. This is very helpful. I have to perform this operation on a big table (Having 50 columns). So Add column is difficult. Is there a way to implement this for a table?
@santioctaviani23894 жыл бұрын
hi chandoo, i have very big messy data of suppliers name, the problem is i can find 1 suppliers name wrote in 15 different way, I would like to uniform the name so that i can use pivot table to summarize each spend we made to these suppliers, do you know how to do it in power query?
@johnabram41593 жыл бұрын
Amazing! Than you, Chandoo! BTW, what fonts you used for the slide @ 4:00. You use great presentation slides, Chandoo.
@KiranKumar-pn3ul Жыл бұрын
Hi Chandoo, thanks that was helpful, I looking for formula where if it finds the text in a cell, that cell should get replaced with another text or value or we can perform this in new column.. can you please help with the formula
@y5jeyfuyf4 жыл бұрын
absolutely amazing, list replaced a list!
@chandoo_4 жыл бұрын
Glad you liked it!
@KuldeepSingh-nq1vi2 жыл бұрын
Nice and Very informative Video.
@chandoo_2 жыл бұрын
Thanks for liking
@gnsarathbabu5 ай бұрын
Hi Chandoo, how to do this replace only if two columns from both tables match
@ahsan_habib_sunny Жыл бұрын
Hey, Chandoo. Great watching this tutorial but I found using Reduce and lambda function to handle this issue as you've shown a tutorial about using this technique more than power query. Which one you think more handy to use?
@Softwaretrain4 жыл бұрын
Wooow, really useful. I used List.Generate but this one is simpler. Thanks
@chandoo_4 жыл бұрын
Glad it was helpful!
@phoenixgirl2353 жыл бұрын
Thanks you for this. You showed that this list can work for text. What about numbers? Is it possible to replace numbers using this function?
@chandoo_3 жыл бұрын
You can do it with numbers too. Power Query has specific data types for everything. So either convert numbers to text (Text.From() should work) or change everything to numbers.
@zoubeyrboudene81573 жыл бұрын
That was insane ! thanks sir !
@chandoo_3 жыл бұрын
🤯
@zbatevp-vlogs610 Жыл бұрын
I don't understand the relevance of this.... List.Numbers(0, Table.RowCount(replacements)) is this just a dummy List, to satisfy the parameter?
@sandyfreborg2464 Жыл бұрын
Chandoo - This is great. However, when I try this myself, it takes a LONG time to load. My data sets are small to start (10 rows and 30 columns in the data, and 10 rows of special character to hexidecimal code). Any thoughts on what could be happening? Its getting up to the 9 GB size and takes over a day to load.
@hudzaifahhudzaifah-zv6yw11 ай бұрын
Do you find the sollutions brother? I tried on my 5000+ rows and face the same problem
@snehaciril Жыл бұрын
Hai sir, i would like to know From a particular list if there is a value is null, then pick the value from the next column how can I exicute this through power query...
@AdityaDsouza-s1r16 сағат бұрын
how can we do this if the replacement is in multiple sheets and can be in different position
@defaultHandle11103 жыл бұрын
Please do a video showing how to do dynamic replacement using a list of columns, also at the same time, to make the replacement conditional.
@chandoo_3 жыл бұрын
Sure. I will think about this.
@IrshadKhan-nd2rg2 жыл бұрын
Hi, Thanks for the video... I was looking for something like - I want to replace "Apple lghlkdshlhdshglsh" with "Apple" so i have used * sign in excel vba to replace unknow things after Apple... but power query gave me error using the same thing in power query.
@ericng88113 жыл бұрын
You are a genius!
@chandoo_3 жыл бұрын
Thanks Eric.. I am glad you found this useful :)
@chakrabmonoj2 жыл бұрын
This is a wonderful lesson Chandoo...I have a long list of cities, which will require this kind of replacement. Is there a way the code can run in a case-agnostic way? I have run your code on my table, but its returning the exact same names and not replacing anything really. Could this be happening because the target table has the city names in uppercase and the replacement table I have made, by mistake I got the city names in lowercase? Any help much appreciated.
@chandoo_2 жыл бұрын
Power Query is (strangely and annoyingly) case sensitive. I would just lower case everything before doing any operations like this.
@chakrabmonoj2 жыл бұрын
@@chandoo_ I did that - changed everything to one uniform case...but there are two strange problems : 1. If the text to replace has multiple words - like "Navi Mumbai", it is not replacing & 2. In some cases, all instances are not getting replaced - e.g. out of 6 instances of "Howrah", 5 got replaced with the intended replacement of "Kolkata", but one instance did not. Can you throw some light on that? Thanks
@rleigh52042 жыл бұрын
Wonderful explanation! Is there a way to combine the functionality of list.accumulate with splitting text over several delimiters? I've been working for several hours on this but I'm coming up empty. Any help would be greatly appreciated.
@chandoo_2 жыл бұрын
Thanks R L. If your delimiters are single chars, you can use = Text.SplitAny() For example, = Text.SplitAny("something or other, but not both. Mr", " ,.") will split the text for any of the space, comma or period delimiters
@harekrushna094 жыл бұрын
Thank you Sir, This is very useful.
@chandoo_4 жыл бұрын
You are welcome
@yassinenj17664 жыл бұрын
How can we change the whole value of the cell and not only a part of the text ? (I'm trying to use the Table.ReplaceValue instead of the text.replace but it gives me an error). And how can we do the replacements in the original column without creating a new one ? Thanks you
@chandoo_4 жыл бұрын
Hi Yassine... just use Replace values button in the Home ribbon of Power Query editor for this.
@yassinenj17664 жыл бұрын
@@chandoo_ Hello, what i mean is how to do it in the context of your formula, because i'm also usng another table as a reference.
@chriswall47954 жыл бұрын
Haven’t tried this yet, but it will replace part words, won’t it? Could produce issues at times. Also would be case sensitive for text. Example: Find six Replace four would change sixteen to fourteen but also sixty to fourty... and would fail if there is capitalisation : Sixteen would remain unchanged. That said, I foresee using this as a powerful data cleansing trick.
@MohanYGK2 жыл бұрын
Greetings from Riyadh, Saudi Arabia. I am working in Retail Industry. On an average we have 500 K invoices in a month and mostly customers are paying by Card. We have over 125 stores spreading across in 32 cities. Unfortunately our banker is not giving POS # (Point of Sales machine number) in a separate column. It is part of Transaction description. More over POS Machine # is not fixed in the transaction description. We have POS Machine # and Store ID for all 125 stores (POS Master File). Is there any possibility to get the following solution from Power Query: ---> Identify POS Machine in the Transaction description table and add Store ID in a separate column based on the POS Master file. I tried List.Accumulate function but it is replacing POS # with StoreID in the same column along with other text. But I need store id exclusively in different column. Looking forward your solution brother.
@shreedharan.moorthy2 жыл бұрын
i tried this in my report in which Style number should be replaced by Style group (ex AM1234 as A/1234. This is for 1000 of rows with multiple such style group. Getting error.
@entertainmentgalaxy9714 жыл бұрын
WOW. GBU. Thanks for Accumulate fun.
@chandoo_4 жыл бұрын
Thank you Haider :)
@davidferrick3 жыл бұрын
How can I tweak this to show a column of the keywords found instead of replacing the text?
@chandoo_3 жыл бұрын
Good idea. Why not try playing around in PQ and see which M functions can let you do that.
@davidferrick3 жыл бұрын
@@chandoo_ LOL, I cheated and used my replace values encapsulted in delimiters and then extracted between delimiters to create a bucket. :)
@josephdoe51952 жыл бұрын
Can this be replicated for multiple columns?
@abdulwahed74263 жыл бұрын
Dear Mr Chandoo What is the limit of maximum words we can replace
@RaviGupta-mo1nf3 жыл бұрын
I used your technique to change header names coming from multiple excel files. But ALL List.Accumulate did was to capitalize each word in the header. Any reason why?
@chandoo_3 жыл бұрын
It depends on what you are using to ACCUMULATE. See the video again and examine description links as this is a tricky concept.
@larmondoflairallen47052 жыл бұрын
This is very very good, but when we want to replace values, we want to replace them in the existing column, not create a new column. Since Table.ReplaceValue is a very different kind of function than Table.AddColumn, I wonder how you could implement this solution to change the values without creating a new column.
@chandoo_2 жыл бұрын
There is no cost to creating a new columns in PQ. So instead of figuring something else out, why not add the column with the replacement logic and then remove the original column?
@PedroCabraldaCamara3 жыл бұрын
awesome. Thank you so much
@chandoo_3 жыл бұрын
You're very welcome!
@arenddickman69224 жыл бұрын
Thanks a lot. I already used it at work. A small error has crept in ... After Table.RowCount -1 is unnecessary. Skip the last line.
@chandoo_4 жыл бұрын
Yes, you are right. Yeah, it was an error that I had too. If you see the video at end, I realize that mistake and fix it.
@arenddickman69224 жыл бұрын
I'm inattentive ... I'm sorry. You can also create a list like you at the beginning of the movie. {0 .. Table.Row.Count (tablename) -1}
@gospelmoto28332 жыл бұрын
superb...thanks
@rrrraaaacccc8011 ай бұрын
💯👍
@prashantpanjabi56564 жыл бұрын
Thank sir. This video is very useful. Sir please explain this video in HINDI.
@chandoo_4 жыл бұрын
Hi Prashant.... Thanks. I am glad you enjoyed it. I am not proficient in Hindi. But I will try add a Hindi or Telugu video once in a while. As Excel interface and resources are all in English, it is a lot easier to explain in that. As they say... koshish karoonga… :)
@taizoondean6893 жыл бұрын
Little difficult but thanks for helping
@chandoo_3 жыл бұрын
No worries!
@SujonAhmed264 жыл бұрын
Great
@inkuban Жыл бұрын
Why not use List.Generate, I don't see the point in having a state.
@chandoo_ Жыл бұрын
Sure. If that method works for you, use it.
@Kasia_uk9 ай бұрын
Don’t type dot when searching for the function. There’s no bug
@chandoo_9 ай бұрын
In my book, it is a bug. The Power Query intellisense has been buggy for years and just shows developers are not thinking thru real-world scenarios.
@syamkumar-tc3xo3 жыл бұрын
Not explained in effective way
@chandoo_3 жыл бұрын
List.Accumulate is one of the trickiest to understand and explain. If you mastered it, feel free to make a video or blog article and share it with us.