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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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