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
Nusc
Helper II
Helper II

Delimeters - Data Cleansing/Best Practices

Hi,

 

so there were data entries in this column that were separated in the following form:

 

pigs - type - cats

 

but some entries have

 

pigs - types - cats

pig-s - type - cats

pigs - type - cats -oct-11-2017

 

 

So unfortunately I cannot separate this column by delimiter.

 

What is the best way of doing this? Do you recommend an if statement that checks to see if there is a '-' more than 3 times ?

 

I would also need to write something that checks for the first several letters to normalize 'type' and 'types'.

What is the name of this function?

1 REPLY 1
LivioLanzo
Solution Sage
Solution Sage

Hi @Nusc

 

You can get the text before the 3rd delimiter with this function: https://docs.microsoft.com/en-us/powerquery-m/text-beforedelimiter

 

You could add an extra - at the end of each string before calling this function

 

For the other problem, probablt this function can help you: https://docs.microsoft.com/en-us/powerquery-m/text-replace

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

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