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

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

Reply
PBInonpro
Helper III
Helper III

Trim and Clean .. how do you know when to?

Not by choice, but we utilize a lot of Excel Spreadsheets that are formatted. When we go into excel we would check each column's data to see if there were extra characters (undefined, tabs, spaces, etc) and clean from there. 

 

not that I transitioned over to Power BI I noticed it isn't easy to check data the same way to determine if it needs to be cleaned/trimmed; should it be a blanket rule to clean/trim all excel spreadsheets? And further, what is the difference between trim and clean!!?? 

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @PBInonpro - using both is recommended if you are importing Excel files.  Please refer to the Power Query guidance to see the difference between removing blank spaces at beginning and end (trim) and removing special characters (clean).  
Text.Clean - PowerQuery M | Microsoft Learn
Text.Trim - PowerQuery M | Microsoft Learn

 

Note this may not remove all special characters like #?|.

View solution in original post

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @PBInonpro - using both is recommended if you are importing Excel files.  Please refer to the Power Query guidance to see the difference between removing blank spaces at beginning and end (trim) and removing special characters (clean).  
Text.Clean - PowerQuery M | Microsoft Learn
Text.Trim - PowerQuery M | Microsoft Learn

 

Note this may not remove all special characters like #?|.

Helpful resources

Announcements
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.