Forum Discussion
[DataFormat.Error] We couldn't convert to Number.
Hi Anna,
Are you getting your data from an excel file? If so it's quite possible that there are either spaces in the field before or after the numbers which can cause this, in which case you'd have to go into query editor and trim the column before converting it.
There can also be false blank values, my excell often gives me strange blanks like these where they are recognised as a value instead of blank,
As seen above, the values in the column are not null, but they aren't spaces either so trim does not work.
In this case replacing nothing with null before conversion generally works for me
Kind Regards,
Ian
- AnnaFenton8 years agoFrequent Visitor
Hi Ian,
Thank you for sharing the tip. I will keep this in mind.
I did get the data from CSV excel file.
I would thought "null" would always appear on the top when I apply filter on the column or maybe not... I converted null with nothing and tried the trim as you suggested. I then converted the column into whole number. Finally I clicked "Apply". Same error still occurs.
Although I later downloaded the file with no error from my course instructor and could continue working on it, I'm still curious to know why this error still occurs.
Thank you very much for your time.
Kind regards,
Anna