Home / Power BI / Inner Trim in Power BI
CONTENTS

Social Shares

Inner Trim in Power BI

Microsoft Power BI - Addend Analytics

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

Gaurav Lakhotia
Manager - Data Analytics & Engineering at  | gaurav.l@addendanalytics.com

Gaurav holds an MBA in Business Analytics. As a data geek and avid learner, he has earned accolades including Microsoft Certified Data Analyst, Microsoft Certified Azure Administrator, and active Power BI Community contributor. He is also a Microsoft Certified Trainer. With critical thinking and project delivery skills, he strives to achieve customer delight in Data Analytics projects. Gaurav loves travelling with friends when he is not busy working on data.

Author By

Picture of Gaurav Lakhotia

Gaurav Lakhotia

Gaurav holds an MBA in Business Analytics. As a data geek and avid learner, he has earned accolades including Microsoft Certified Data Analyst, Microsoft Certified Azure Administrator, and active Power BI Community contributor. He is also a Microsoft Certified Trainer. With critical thinking and project delivery skills, he strives to achieve customer delight in Data Analytics projects. Gaurav loves travelling with friends when he is not busy working on data.

Decision-Ready Analytics

Turn your OEE dashboard into a decision system.

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