cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ask
Helper III
Helper III

How to trim space from Power BI

How to trim space in Power BI?

 

=trim([Name]) doesn't work in edit quries. Any clue?

1 ACCEPTED SOLUTION
GilbertQ
Super User II
Super User II

Hi @ask

 

When you are in the Query editor, make sure your column type is set to Text.


Then right click, select Transform and then Trim

 

A-PBI Community.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
DeeMag
Helper II
Helper II

Hi,

 

can you please help me in trimming this space please. I have used Trim function on this text field but the Trim function does not work on this.

The length of this reference is showing as 12 instead of 11.  There is space before the reference number.

DeeMag_0-1621375775038.png

 

Thank you.

 

Hi,

Under Transform, select Clean.  If it does not help, then share the link from where i can download your PBI file.  Show the problem there clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish, clean and replace functions both are not working. I will try to replace in sql,if not i will create a sample pbix file and share with you, thanks a lot.

GilbertQ
Super User II
Super User II

Hi @ask

 

When you are in the Query editor, make sure your column type is set to Text.


Then right click, select Transform and then Trim

 

A-PBI Community.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

Great answer!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors