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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors