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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors