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.
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. 😊
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.
To omit a few columns from the transformations, in the curly braces you'd write something like this. { {"ColumnName", each _}, {"ColumnName2", each _} }
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.
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.
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
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?
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.
The way you explain is amazing one can easily understand even complex things . Excel is fun , laila gharani and ur RUclips channel are very helpful , keep it up
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) )?
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.
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
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.
@@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," "," ") ) )
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?
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
If the table contains columns with numeric values or dates, ERROR data is displayed. A small change to the RemoveSpaces function prevents this. (InputData as any) => let CleanData = try Text.Combine(List.Select(Text.Split (Text.Trim(InputData)," "),each _ "")," ") otherwise InputData in CleanData
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.
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.
@@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.😊
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
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 :)
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?
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
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.
Thanks! Another super video. I've been doing Power Query since Data Explorer, and I'm still learning from your videos.
Glad to hear! Thank you for the tip
Very practical solution..Had this exact issue last month.. Replicating the function to all columns was genius :) learnt something new today..
Glad it was useful !
Same here.. my initial thought was to use Regular Expressions (RegEx) but wasn't sure if there was a way to do this in PQ
You read my mind Chandeep! Was thinking about scalability of this custom function. This is perfectly ✅done. Thanks a million
Glad to hear!
Terima kasih.
thank you so much
Never saw a function creation in Power Query before! I have to try it out in my reports!
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. 😊
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.
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
Dude, this video is THEEEE BEST, helped me with so many problems I was having today! GREAT WORK !!!
Awesome 👌 You took care of scalability very well
If we need to apply the function on some of selected columns, do we need to provide those columns name in { }?
To omit a few columns from the transformations, in the curly braces you'd write something like this.
{ {"ColumnName", each _}, {"ColumnName2", each _} }
Really impressive ! Seems so easy, but for anybody it would require hours of work. Thx a lot for this nice tip
You are welcome!
Excellent Boss!! Thanks Bro!!!
You're welcome!
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.
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.
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
great sir ................................Mashallah
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?
Thanks for posting this useful video. As always you explain things so clearly. What I learnt here will certainly be useful in the future.
Great to hear!
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.
A great and smart Solution using the given capabilities of M-Functions.
I'm going to feel sMarter all day today because I spent 12 minutes watching this video this morning. Thank you, Chandeep! 🙏
Cool!
The way you explain is amazing one can easily understand even complex things . Excel is fun , laila gharani and ur RUclips channel are very helpful , keep it up
Thanks Amit!
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) )?
Fantastic! I had no idea we could apply a function to all columns like that. Thank you a lot!
Excellent explanation, as always. It is very important to learn how to correctly create custom functions.
Glad you like it!
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.
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
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.
Hi Chandeep, great vid. Is there a way to remove duplicate in the list before the text combine?
after this brilliant content ,the question why Microsoft make Trim function in PQ not as in excel !!!!!
Thanks Chandeep !
Thank you very much for the amazing solution.
Always welcome
I'm addicted to your videos.😋
That's what I'd like to hear. Thank you ❤️
Last trick is really amazing - thank you 🙏
You're welcome!
Thanks Chandeep!! Another great video full of useful tricks and tips. Will keep this technique at my fingertips for the future. Thumbs up!!
Great!
@@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," "," ")
)
)
Really good tips, saved the best for last!
Thanks!
Excellent,
Thank you very much.
It would have been even better if you left the code in the description or something.
Thanks for sharing ❤
Glad you enjoyed it!
@@GoodlyChandeep always🙌
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!
Thank you, it helped me to solve my problem beautifully!
Excellent as usual Chandeep 👍 👍
Thanks a ton
{ } to apply on all columns... Awesome, indeed! Gonna steel that 🙂
How would you use this function for few selected columns?
Thanks for the incredible video. Please keep up the great works.
Thanks, will do!
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?
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
You can try Text.Insert function
Muito obrigado pelo vídeo! Gostei muito!!!
Much useful in cleaning the data, Thank you very much
Glad to hear that
Very good solution....
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
Always fantastic stuff, Chandeep! Thanks again.
Glad to hear that!
That's awesome ❤❤❤ thanks so much bro
Thanks brother.
Do you have solution to convert ranges of different excel sheet into table in one go.
It's a great Solution...
Awsome.. !
Thanks !
As you said, that is AWESOME!
Belleza!!!
Thanks!
If the table contains columns with numeric values or dates, ERROR data is displayed. A small change to the RemoveSpaces function prevents this.
(InputData as any) =>
let
CleanData = try Text.Combine(List.Select(Text.Split (Text.Trim(InputData)," "),each _ "")," ") otherwise InputData
in
CleanData
Very Nice Video as well as Nicely Explained each and every thing clearly..
Thank You!
Thanks for this amazing video! It's really helpful ❤
God level 🙏🙏.. Really loved it.
Thank you !
Great very useful trick . Thanks.
Glad you liked it!
An excellent video. Thanks
Lol....Excel is fun... Very good man!!!! Thank you!
Glad you enjoyed it!
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.
You're selecting the text for the list, therefore, you need to use List.Select, not Text.Select.
Awesome. Your contents are wonderful.
Thanks!
Very interesting and helpful Video. thank you very much for sharing
Glad you like it !
How to deal with null in columns
Very useful function! Thank you Sir.
Glad you like it
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.
Another great learning
Glad it was helpful!
@@GoodlyChandeep i sent you text on LinkedIn from Harmeet Singh
YEAH! This is cool. Thank you so much!
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???
Pretty awesome! ;) Thanks so much. Very usefull solution
Glad you like it!
Hi Chandeep, you are amazing👍
Hey, thanks!
Bro i have data in excel file, sheet name xyz, now if i change sheet name abc then the will load to power query?
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.
I like how you giggle on results you get. 😁👌
he he he..
Did I? I went back and saw the whole video again 😂
@@GoodlyChandeep yeah, you always do that and this is cute, don't stop it, it's your feature😁👌
@@Rice0987 Still couldn't figure out where I did it :D
@@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.😊
Thank you!
This was really helpful, however, can you also make a similar query if we have both data and numbers?
kindly make video on Evaluate DAX function
That is awesome!
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
Awesome 😎😎👍🏻
Thanks ✌️
Amazing 👌🏻
Thank you!
Amazing👍👏👏👏
Thanks!
Fantastic
Thank 😊, very interesting
Glad you liked it!
This is godly! Super o super....
Thank you!
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 :)
I don't know of any such setting. You could be dealing with something that looks like a space but isn't.
You can omit the Date column for the formula to avoid getting errors.
👏 Awesome
Thank you!
Great Video
Glad you enjoyed it
Espetacular!!
It must be terrible to be so clever!! LOL Thanks from South Africa.
Glad you enjoyed it!
Is this there in power query course
No I am working on creating a new course on M language.
@@GoodlyChandeep please do it asap
Its HIGHLY needed by all PBI developer
Awesome.
Thanks!
Bruxaria! 🙂
Brilliant
Thanks!
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?
How to dynamic date start jan 2022 end Des 2022 by pòwer query
Thanks
Glad you like it!
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
Text.Trim function removes leading and trailing spaces.