Excel Like TRIM Function in Power Query

  Рет қаралды 24,542

Goodly

Goodly

Күн бұрын

Check out our newly launched M Language course ↗️ - goodly.co.in/learn-m-powerquery/
Here in this video, we will talk about how you can remove unwanted spaces from your text values in Power Query. We'll also learn about creating dynamic custom functions.
===== ONLINE COURSES =====
✔️ Mastering DAX in Power BI -
goodly.co.in/learn-dax-powerbi/
✔️ Power Query Course-
goodly.co.in/learn-power-query/
✔️ Master Excel Step by Step-
goodly.co.in/learn-excel/
✔️ Business Intelligence Dashboards-
goodly.co.in/learn-excel-dash...
===== LINKS 🔗 =====
Blog 📰 - www.goodly.co.in/blog/
Corporate Training 👨‍🏫 - www.goodly.co.in/training/
Need my help on a Project 💻- www.goodly.co.in/consulting/
Download File - goodly.co.in/remove-spaces-be...
===== CONTACT 🌐 =====
Twitter - / chandeep2786
LinkedIn - / chandeepchhabra
Email - goodly.wordpress@gmail.com
===== CHAPTERS =====
0:00 Intro
0:21 Removing Spaces
4:28 Creating a Function
8:51 Applying to Multiple Columns
10:44 My Courses
===== WHO AM I? =====
A lot of people think that my name is Goodly, it's NOT ;)
My name is Chandeep. Goodly is my full-time venture where I share what I learn about Excel and Power BI.
Please browse around, you'd find a ton of interesting videos that I have created :) Cheers!
- - - - -
Music By: "After The Fall"
Track Name: "Tears Of Gaia"
Published by: Chill Out Records
- Source: goo.gl/fh3rEJ​
Official After The Fall KZfaq Channel Below
kzfaq.info/love/GQE...
License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Full license here: creativecommons.org/licenses

Пікірлер: 169
@khalidmajeed2886
@khalidmajeed2886 Күн бұрын
great sir ................................Mashallah
@joelabacherli1310
@joelabacherli1310 9 ай бұрын
I’ve scrolled past this video for a while. Finally checked it out and I wish I would have earlier. This is incredibly helpful to format the messed up data I get every day. Thank you so much as always. You are awesome.
@williamarthur4801
@williamarthur4801 Жыл бұрын
Thank you again for another interesting video, it was great that you went on to make a function, which I still find tricky at times, especially if there are multiple columns to work on, not so bad if it works on a table.
@raimundojs9547
@raimundojs9547 Жыл бұрын
Fantastic! I had no idea we could apply a function to all columns like that. Thank you a lot!
@olegariocamara9308
@olegariocamara9308 Жыл бұрын
Dude, this video is THEEEE BEST, helped me with so many problems I was having today! GREAT WORK !!!
@SJV992
@SJV992 4 ай бұрын
Hey thanks for this Goodly, it's a really helpful video and just what I needed. Your presentation style and clear explanations are great. Keep up the great work.
@luisjavier1284
@luisjavier1284 Жыл бұрын
It is pretty awesome. I came across with your channel two days ago and I am really excited about all the thing that I have learned. Kudos
@excel-in-g
@excel-in-g Жыл бұрын
{ } to apply on all columns... Awesome, indeed! Gonna steel that 🙂
@SndfOmar
@SndfOmar 6 ай бұрын
Thank you Chandeep, your channel is my no. 1 source for learning for free. I guess this video is a duplicate of another one labeled "Remove unwanted spaces"! But thank you again and again. 😊
@Milhouse77BS
@Milhouse77BS Жыл бұрын
Thanks! Another super video. I've been doing Power Query since Data Explorer, and I'm still learning from your videos.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad to hear! Thank you for the tip
@dianamgdata
@dianamgdata Жыл бұрын
Never saw a function creation in Power Query before! I have to try it out in my reports!
@gennarocimmino
@gennarocimmino Жыл бұрын
what to say? simply brilliant. Very useful functions and approaches explained in really simple language. Thank you for sharing these tricks. see you next time.
@adrianoschwenkberg6773
@adrianoschwenkberg6773 11 ай бұрын
A great and smart Solution using the given capabilities of M-Functions.
@Sumanth1601
@Sumanth1601 Жыл бұрын
Very practical solution..Had this exact issue last month.. Replicating the function to all columns was genius :) learnt something new today..
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad it was useful !
@ThGrum
@ThGrum 4 ай бұрын
I'm addicted to your videos.😋
@GoodlyChandeep
@GoodlyChandeep 4 ай бұрын
That's what I'd like to hear. Thank you ❤️
@gustavobarbosa906
@gustavobarbosa906 Жыл бұрын
The possibility of using empty curly braces to transform all the columns of a table is invaluable. Thank you, for teaching us how to do it!
@kadusilva4516
@kadusilva4516 4 күн бұрын
Muito obrigado pelo vídeo! Gostei muito!!!
@incoref
@incoref Жыл бұрын
Thank you, it helped me to solve my problem beautifully!
@izzatkiswani
@izzatkiswani 10 ай бұрын
after this brilliant content ,the question why Microsoft make Trim function in PQ not as in excel !!!!! Thanks Chandeep !
@jameszhou162
@jameszhou162 Жыл бұрын
You read my mind Chandeep! Was thinking about scalability of this custom function. This is perfectly ✅done. Thanks a million
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad to hear!
@SalihKocaSK
@SalihKocaSK Жыл бұрын
Thanks for another very useful and helpful content @Chandeep. Would you think to include inseparable space (which is very common in copied text from browsers) and line break characters next time? It was my challenge last week, somehow I sorted it out but I am sure that you have simpler and more sophisticated solutions.
@comsavvy_ogp
@comsavvy_ogp 5 ай бұрын
Thanks for this amazing video! It's really helpful ❤
@prasadraja17
@prasadraja17 7 ай бұрын
This is awesome! And I have a doubt to change the date range of an SQL query embedded into excel power query, as in for now I am changing it manually as I need to pull the details on incremental
@RonDavidowicz
@RonDavidowicz Жыл бұрын
Very useful video, thank you. Is there a way of creating a library of these personal functions and use them in different queries, something like the personal macro workbook for Excel?
@yousefabdelsamie5983
@yousefabdelsamie5983 4 ай бұрын
Excellent, Thank you very much. It would have been even better if you left the code in the description or something.
@ronnieyandell931
@ronnieyandell931 4 ай бұрын
An excellent video. Thanks
@roywilson9580
@roywilson9580 Жыл бұрын
Thanks for posting this useful video. As always you explain things so clearly. What I learnt here will certainly be useful in the future.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Great to hear!
@laurentmarc1928
@laurentmarc1928 Жыл бұрын
Really impressive ! Seems so easy, but for anybody it would require hours of work. Thx a lot for this nice tip
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
You are welcome!
@IvanCortinas_ES
@IvanCortinas_ES Жыл бұрын
Excellent explanation, as always. It is very important to learn how to correctly create custom functions.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you like it!
@joaquimcosta952
@joaquimcosta952 7 ай бұрын
Very good solution....
@EricaDyson
@EricaDyson 11 ай бұрын
As you said, that is AWESOME!
@MrAbrandao
@MrAbrandao 12 күн бұрын
Great work. I find power Query misleading. The assist for the function table.transformcolumns doesnt show all options from the start, you have to type {} for it to show the next availeable option
@AnbarasuAnnamalai
@AnbarasuAnnamalai Жыл бұрын
Much useful in cleaning the data, Thank you very much
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad to hear that
@robertlevak
@robertlevak 4 ай бұрын
YEAH! This is cool. Thank you so much!
@ivancuadros8731
@ivancuadros8731 Жыл бұрын
Really good tips, saved the best for last!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@SeyPras.
@SeyPras. 5 ай бұрын
Hi Chandeep, great vid. Is there a way to remove duplicate in the list before the text combine?
@advrohitowhal9794
@advrohitowhal9794 Жыл бұрын
Excellent Boss!! Thanks Bro!!!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
You're welcome!
@Luciano_mp
@Luciano_mp Жыл бұрын
Lol....Excel is fun... Very good man!!!! Thank you!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you enjoyed it!
@hoaithuongluu2869
@hoaithuongluu2869 Жыл бұрын
That's awesome ❤❤❤ thanks so much bro
@ratiram9556
@ratiram9556 Жыл бұрын
Great very useful trick . Thanks.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you liked it!
@nishantkumar9570
@nishantkumar9570 Жыл бұрын
Awesome 👌 You took care of scalability very well
@nishantkumar9570
@nishantkumar9570 Жыл бұрын
If we need to apply the function on some of selected columns, do we need to provide those columns name in { }?
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
To omit a few columns from the transformations, in the curly braces you'd write something like this. { {"ColumnName", each _}, {"ColumnName2", each _} }
@mukeshbehera4499
@mukeshbehera4499 6 ай бұрын
thanks for your tricks, awesome. One issue as while added a new column to excel source table, data model is getting failed. Is there anyway to solve this.
@syedaneesdurez9880
@syedaneesdurez9880 Жыл бұрын
Thank you very much for the amazing solution.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Always welcome
@HachiAdachi
@HachiAdachi Жыл бұрын
I'm going to feel sMarter all day today because I spent 12 minutes watching this video this morning. Thank you, Chandeep! 🙏
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Cool!
@karimallahwala7022
@karimallahwala7022 Жыл бұрын
Very interesting and helpful Video. thank you very much for sharing
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you like it !
@davidfelipepenaguardiola1177
@davidfelipepenaguardiola1177 Жыл бұрын
Pretty awesome! ;) Thanks so much. Very usefull solution
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you like it!
@muhnuur
@muhnuur Жыл бұрын
It's a great Solution... Awsome.. !
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks !
@s961201
@s961201 4 ай бұрын
You Are awsome! Thanks a lot! One question though: I get confused as how a field/column sometimes is indicated by { } as in the last example in this video ({ } without any value means all columns) and sometimes by [ ] as in using the gear/dialogue box for the code (then your column name is between [ ]). Care to enlighten me…? Thanks
@obaidulbau
@obaidulbau 11 ай бұрын
Thanks for the incredible video. Please keep up the great works.
@GoodlyChandeep
@GoodlyChandeep 11 ай бұрын
Thanks, will do!
@billgillaspey9036
@billgillaspey9036 Жыл бұрын
Thank You !!! Another great lesson on the creative use of PQ to solve a problem that can sneak up and "bite" the unsuspecting power query user. (Ask me how I know... ha ha ). Just wondering: wouldn't there be a creative use of replace (i.e., Table.ReplaceValue to replace 2 spaces with single space (even if it had to be repeated) )?
@incoref
@incoref 7 ай бұрын
Thank you!
@z.719
@z.719 Жыл бұрын
Very useful function! Thank you Sir.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you like it
@txreal2
@txreal2 Жыл бұрын
That is awesome!
@vamshimedishetty5624
@vamshimedishetty5624 Ай бұрын
I appreciate your hard work. I followed the same and showing as list. Affer clicking on each item i.e., it is not showing as list. Just showing as normal string instead of line by line in list. What might be the reason.
@ricardobunge5957
@ricardobunge5957 Жыл бұрын
Always fantastic stuff, Chandeep! Thanks again.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad to hear that!
@martyc5674
@martyc5674 Жыл бұрын
Excellent as usual Chandeep 👍 👍
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks a ton
@KuldeepSingh-nq1vi
@KuldeepSingh-nq1vi Жыл бұрын
Very Nice Video as well as Nicely Explained each and every thing clearly..
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thank You!
@wayneedmondson1065
@wayneedmondson1065 Жыл бұрын
Thanks Chandeep!! Another great video full of useful tricks and tips. Will keep this technique at my fingertips for the future. Thumbs up!!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Great!
@wayneedmondson1065
@wayneedmondson1065 Жыл бұрын
@@GoodlyChandeep Here is something I created adding a custom column using List.Accumuate. Also gets the job done: Text.Trim( List.Accumulate( {0..Text.Length([Text])}, [Text], (state,current)=> Text.Replace( state," "," ") ) )
@navisalomi
@navisalomi Жыл бұрын
Awesome. Your contents are wonderful.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@rohit2492
@rohit2492 Жыл бұрын
This was really helpful, however, can you also make a similar query if we have both data and numbers?
@amitk1208
@amitk1208 Жыл бұрын
The way you explain is amazing one can easily understand even complex things . Excel is fun , laila gharani and ur KZfaq channel are very helpful , keep it up
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks Amit!
@AAAExcel
@AAAExcel Жыл бұрын
Last trick is really amazing - thank you 🙏
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
You're welcome!
@randolfojolongutierrez5311
@randolfojolongutierrez5311 Жыл бұрын
Belleza!!!
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@lukereds9975
@lukereds9975 Жыл бұрын
Hi Chan vedy good videos than you, in this one you could avoid to use Text.Trim because the spaces will be deleted from the other formulas.
@modernboutique1389
@modernboutique1389 Жыл бұрын
Another great learning
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad it was helpful!
@modernboutique1389
@modernboutique1389 Жыл бұрын
@@GoodlyChandeep i sent you text on LinkedIn from Harmeet Singh
@ranjitramakrishnan6823
@ranjitramakrishnan6823 Жыл бұрын
Hi Chandeep, you are amazing👍
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Hey, thanks!
@tnssajivasudevan1601
@tnssajivasudevan1601 Жыл бұрын
Thank 😊, very interesting
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you liked it!
@agustinrajan8621
@agustinrajan8621 Жыл бұрын
God level 🙏🙏.. Really loved it.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thank you !
@abhijeetshetye3764
@abhijeetshetye3764 Жыл бұрын
Amazing 👌🏻
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thank you!
@santoshpv321
@santoshpv321 Жыл бұрын
This is godly! Super o super....
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thank you!
@equilibriocontabilidadeadm5277
@equilibriocontabilidadeadm5277 Жыл бұрын
Great Video
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you enjoyed it
@MANATTOWN
@MANATTOWN Жыл бұрын
Chandeep I have another approach to this problem. First replace the " " with " |" then replace the "| " with "" (null) and lastly replace the "|" with "" (null) again. I hope this will work.
@surajchavan6447
@surajchavan6447 Жыл бұрын
Awesome 😎😎👍🏻
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks ✌️
@julie_chen
@julie_chen Жыл бұрын
👏 Awesome
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thank you!
@ShubhamSharma-ls6hj
@ShubhamSharma-ls6hj Жыл бұрын
Thanks brother. Do you have solution to convert ranges of different excel sheet into table in one go.
@Ypurenete
@Ypurenete 10 ай бұрын
Espetacular!!
@ExcelWithChris
@ExcelWithChris Жыл бұрын
It must be terrible to be so clever!! LOL Thanks from South Africa.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you enjoyed it!
@faisalag9611
@faisalag9611 Жыл бұрын
Awesome.
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@rajendrakumaroram9812
@rajendrakumaroram9812 Жыл бұрын
Amazing👍👏👏👏
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@FRANKWHITE1996
@FRANKWHITE1996 Жыл бұрын
Thanks for sharing ❤
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you enjoyed it!
@FRANKWHITE1996
@FRANKWHITE1996 Жыл бұрын
@@GoodlyChandeep always🙌
@balajikomma541
@balajikomma541 Жыл бұрын
kindly make video on Evaluate DAX function
@DhruvDua88
@DhruvDua88 Жыл бұрын
Brilliant
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@faizanahmed2239
@faizanahmed2239 2 ай бұрын
Hi dear, i tried this approach, but space not removed by list.select. can you confirm what would be the issue. Is this related other characters???
@ashivns
@ashivns 27 күн бұрын
How to deal with null in columns
@alphabarry3448
@alphabarry3448 8 ай бұрын
Hello thank you for this video, I applied it but in the Text.Select it generate error. In the column though it is text type there are numbers as well. Thank you helping find what os wrong.
@tigitang8719
@tigitang8719 6 ай бұрын
You're selecting the text for the list, therefore, you need to use List.Select, not Text.Select.
@sebastiannorge2980
@sebastiannorge2980 Жыл бұрын
Thanks
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Glad you like it!
@MdMehediHasanMuttaki
@MdMehediHasanMuttaki Жыл бұрын
Bro i have data in excel file, sheet name xyz, now if i change sheet name abc then the will load to power query?
@qungu7251
@qungu7251 Жыл бұрын
Thank you, I come across an error when I use the function, An error occurred in the ‘’ query. Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression? Can you please help me to solve this error? thank you
@telclissonperes
@telclissonperes Жыл бұрын
Bruxaria! 🙂
@Rice0987
@Rice0987 Жыл бұрын
I like how you giggle on results you get. 😁👌
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
he he he.. Did I? I went back and saw the whole video again 😂
@Rice0987
@Rice0987 Жыл бұрын
@@GoodlyChandeep yeah, you always do that and this is cute, don't stop it, it's your feature😁👌
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
@@Rice0987 Still couldn't figure out where I did it :D
@Rice0987
@Rice0987 Жыл бұрын
@@GoodlyChandeep read the first comment: when you get result. And i understand, why you act so, cause power query is amazing instrument to get results in couple steps, when before you should make several complex manipulation. That's why you gig.😊
@abdullahquhtani4247
@abdullahquhtani4247 Жыл бұрын
Great 👍🏼. I have two questions please! 1- Is it possible to use for each to go through all columns instead of using table transform?! 2- Is there a solution to do the opposite, in case I want to add spaces between merged words?
@vishnuvardanatmakuri
@vishnuvardanatmakuri Жыл бұрын
For q2. If u r able to split the merged word based on some delimiter then it's just following merge function to recreate the sentence w spaces
@priyeshsanghvi8424
@priyeshsanghvi8424 3 ай бұрын
You can try Text.Insert function
@jerrydellasala7643
@jerrydellasala7643 Жыл бұрын
AMAZING! How do I give a dozen Likes? Could the function be changed so that just a column is provided as the permeameter instead of the whole table?
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks! Your 1 like worth a Dozen 💚
@brij26579
@brij26579 Жыл бұрын
👌👌
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
Thanks!
@williamthedataprof
@williamthedataprof Жыл бұрын
Thanks bro. That last tip was genius. I've adopted your solution but removed the Trim part of the function. Any harm? William. (InputText as text) => let TrimmedText = Text.Combine( List.Select( Text.Split( InputText, " " ), each _ "" ), " " ) in TrimmedText
@tigitang8719
@tigitang8719 6 ай бұрын
Text.Trim function removes leading and trailing spaces.
@mohamedmubeen2913
@mohamedmubeen2913 Жыл бұрын
Failed to save modifications to the server. Error returned: 'The following system error occurred: Class not registered '. This shows while loading data what can I do?
@dandeman1148
@dandeman1148 Жыл бұрын
When I load Names with Spaces into PQ they seem to be already trimmed, although when Close and Load hey aren't. Is there a setting which automatically shows them as trimmed even if they are not One other thing for the last part it causes an Error if you RemoveSpace Function for all if it has a Date Column. How can you add step to select certain columns :)
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
I don't know of any such setting. You could be dealing with something that looks like a space but isn't.
@tigitang8719
@tigitang8719 6 ай бұрын
You can omit the Date column for the formula to avoid getting errors.
@PawelNap
@PawelNap Жыл бұрын
👍
@ahmednageb8459
@ahmednageb8459 Жыл бұрын
How to dynamic date start jan 2022 end Des 2022 by pòwer query
@sujit3375
@sujit3375 Жыл бұрын
Is this there in power query course
@GoodlyChandeep
@GoodlyChandeep Жыл бұрын
No I am working on creating a new course on M language.
@sujit3375
@sujit3375 Жыл бұрын
@@GoodlyChandeep please do it asap Its HIGHLY needed by all PBI developer
@SamehRSameh
@SamehRSameh 6 ай бұрын
Why {} ??
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 5 МЛН
Introducing Power Query How (Master the M language)
11:41
BI Gorilla
Рет қаралды 5 М.
I Bet You Don't Know All These Power Query Tricks
12:28
Goodly
Рет қаралды 37 М.
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 1,8 МЛН
Battery  low 🔋 🪫
0:10
dednahype
Рет қаралды 12 МЛН
Klavye İle Trafik Işığını Yönetmek #shorts
0:18
Osman Kabadayı
Рет қаралды 6 МЛН
Что не так с раскладушками? #samsung #fold
0:42
Не шарю!
Рет қаралды 208 М.
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 98 М.
САМЫЙ ДОРОГОЙ ЧЕХОЛ! В стиле Mac Pro
0:35