Forum Discussion
Zakaria_1980
6 years agoPost Patron
DataFormat.Error: we couldn't convert to Number
Dears, i was looking to replace( '- ) with ( - ) since in my Excel sheet i have some values with '-70000. the dash caused a problem. when trying to replace it in power query it doesn't allow me ...
Smauro
6 years agoSolution Sage
Hi Zakaria_1980
I think this should work for you:
#"Transform Stuff" =Table.TransformColumns(PreviousStep,{{"Value", (t) => Number.FromText(Text.Replace(Text.From(t), "'", "")), type number}, {"Date", Date.From, type date}})
You should change PreviousStep to the previous step of your query.
I think this should work for you:
#"Transform Stuff" =Table.TransformColumns(PreviousStep,{{"Value", (t) => Number.FromText(Text.Replace(Text.From(t), "'", "")), type number}, {"Date", Date.From, type date}})
You should change PreviousStep to the previous step of your query.
Zakaria_1980
6 years agoPost Patron
below what i go when i added what you have shared with me.
below what i have under power query and i've highlighted what you shared with me, just changing the name of the colmn. thanks to help me with this error.
Thanks
- Smauro6 years agoSolution Sage
You almost got it!
But you should change #"PreviousStep" to #"Changed Type1", you must have missed the part where I said that 🙂It should be
#"Transf.... (#"Changed Type1", ... in #"Transform Stuff"
Cheers- Zakaria_19806 years agoPost Patron
Hi,
even with the update, nothing happend (see below)
- Zakaria_19806 years agoPost Patron
please can someone help.
thanks