Forum Discussion
Text.TrimEnd Replace I can't remove spaces from a column
Hello,
I am getting bank statements, and I want to remove all spaces from the label column .... I tried TrimEnd,..
Text.TrimEnd([Libellé])
I tried ReplaceValue
Table.ReplaceValue(AjLibellé,""" ""","",Replacer.ReplaceText,{"Libellé"})
I cannot get rid of the spaces, however, once in Excel, the function replace "" by nothing, works correctly.
Attached is a Dropbox link of a folder that contains
https://www.dropbox.com/sh/s5my4tqfwlc3bpt/AAD9AHUu6rHyE_X_EgJrM82Xa?dl=0
An example of a recovered CSV file,
a CsvToXLViaPQ folder which contains the Excel file with the PQ request
The relevant query under development is called CC
Thank you in advance for any help you can give me
Philippe Muniesa
Hi PhilippeMuniesa ,
Your M code should look like this:
Table.ReplaceValue(AjLibelle," ","",Replacer.ReplaceText,{"Libelle"})Pete
- Anonymous5 years ago
If you are trying to accomplish this, you need to use the syntax you see in the image
3 Replies
- BA_Pete
Super User
Hi PhilippeMuniesa ,
Your M code should look like this:
Table.ReplaceValue(AjLibelle," ","",Replacer.ReplaceText,{"Libelle"})Pete
- PhilippeMuniesa
Resolver I
thank you,
it is indeed the double quote that causes the problem, however it is the interface of the powerquery editor of excel which offers this syntax.
I ended up bypassing the problem with Text.FromNumber (32),
thank you very much for your two answers
- AnonymousNot applicable
If you are trying to accomplish this, you need to use the syntax you see in the image