Inner Trim in Power BI

  • Post category:Power BI
  • Post author:
  • Post published:August 9, 2021

Addend Analytics is a Microsoft Power BI Gold Partner based in Mumbai, India. Apart from being authorized for Power BI Consulting Partner, Addend has successfully executed Power BI projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia. Get a free consultation now by emailing us at or Contact us

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

Power BI Query Editor

Step2: Create a custom column “Split.1”

Custom Column

Split 1 = Text.Split([City],” “)
This will give you a list of elements.

Power BI

Step 3: Now, we will shrink the list based on the non-null element.

Power BI Custom Column

Shrink.1 = List.Select([Split.1], each _ <> “”)

Step 4: Now, we just have to combine Shrink.1 column to get the desired output.

Custom Column

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