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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors