Hello reader, you all must know how to remove the unwanted spaces or non-printable object in Power Query. What you will do if there is extra spaces present between the word?
In this blog, we will see how to remove extra spaces between the works AKA Inner Trim using Power Query.
Let’s get started…
Step 1: Go to Power Query Editor
Step2: Create a custom column “Split.1”
Split 1 = Text.Split([City],” “)
This will give you a list of elements.
Step 3: Now, we will shrink the list based on the non-null element.
Shrink.1 = List.Select([Split.1], each _ <> “”)
Step 4: Now, we just have to combine Shrink.1 column to get the desired output.
Combine = Text.Combine([Shrink.1], ” “)
This is how you can perform Inner Trim using Power Query. I hope you will find this blog useful.
Thank you for reading this blog. Keep learning…
Gaurav Lakhotia
Sr. Data Analyst
Addend Analytics