Forum Discussion
Remove the date from a text
Hello everyone,
I have a column of 15,000 lines corresponding to folder names.
Some folder names have a date embedded in the name and I'd like to remove it.
This date is of type YYYYMMDD and without "/".
For example :
Column :
20230405_name_file
name_file_20240330
name_file
20220325_name_file
...
Would you know how to remove the date to keep only the name?
Thanks 🙂
HI Anonymous
In the ticket, you shared the wrong sample data before.
Please share more sample data to get an accurate answer
5 Replies
- PijushRoyCommunity Champion
Please create custom column in Power Query and use below code= Text.Select([Column],{" ","_","a".."z","A".."Z"})
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin - AnonymousNot applicable
I have an error :
"Expression.Error : Désolé... Nous n'avons pas pu convertir une valeur de type Record en type Text.
Détails :
Value=
Type fichier=SuiviHebdo16275_Excedent_20230702
Type=[Type]""Type fichier" is the name of my column.
- PijushRoyCommunity Champion
Hi Anonymous
Your Column datatype should be TextFind the pbix file and implement same. Working as per sample data you shared
https://drive.google.com/file/d/1EFQfZpI_s4Z2xzz2-c57l2dG6mNktkST/view?usp=sharing
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
- AnonymousNot applicable
My column type is like this :
- PijushRoyCommunity Champion
HI Anonymous
In the ticket, you shared the wrong sample data before.
Please share more sample data to get an accurate answer