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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Super User

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
Super User

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

Great answer!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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