Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
T-Pan
Helper I
Helper I

Unalble to trim spaces from the end of a string

Hello Everyone,

In power bi service i have crated a report from a "Power Aotomated File" located in Share Point, using Export to Power Bi. 

I have columns that contain strings with special characters such as ( " , { , [ , ]).

Using dax (substitute) i have created another column without the special characters in these values. 

But in my original Column i have two values:

["Maria "]

Maria

The above values in my new Column (free of special characters appear dublicated:

Maria

Maria

I suppose that  this value ["Maria "], in my new column have a space after the last charachter and this is the reason that i have the value two times in my new column.

I tried to "Trim" the new column but nothing happened.

Could anyone help me. I want to trim all spaces after the last character and before the first character.

 

Thank you.

3 REPLIES 3
djurecicK2
Super User
Super User

arvindsingh802
Super User
Super User

To clean the data from tab, space, next line, I will suggest to use Power Query's Clean & Trim step under Formate (Use both step)

arvindsingh802_0-1709114339090.png

Also perform this step after all your replace steps and at end you can use remove duplicate

arvindsingh802_2-1709114414794.png

 

 


If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!
Proud to be a Super User!!

I know that,

But I can't use transform Data, to go to Power Query, so i i want to find a solution using Dax.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.