Home / Power BI / Inner Trim in Power BI

Inner Trim in Power BI

On this Page

Social Shares

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?

City

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

Author By

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Author By

Kamal Sharma

Kamal Sharma

Kamal brings over 20 years of experience in data analytics and business intelligence. He has led the design and implementation of analytics solutions across operations, financial reporting, and performance improvement initiatives. With a background in business statistics and Six Sigma, his work focuses on applying data in a structured and practical way to solve real business challenges.

Decision-Ready Analytics

Turn your OEE dashboard into a decision system.

Book a 30-minute working session with our manufacturing analytics team.
Translate »