I can't change the field type from text to float

253
2
03-30-2020 07:32 PM
by Anonymous User
Not applicable

hi everyone,

I have a problem, I'm trying to create a cartogram, I have data in an xlx file, after adding them to the layer I'm working on, I can't change their type. I'm trying to add a new field in the table and there I choose the float type but after trying to run I get an error. I don't know what I'm doing wrong. Some values from the table have as many as 15 decimal numbers, and in the xlx file I normally have them as 1 decimal number. I suspect this is a problem but I'm not sure. Anyone have any ideas how else can I change the "ogółem" field from text to float?

0 Kudos
2 Replies
RandyBurton
MVP Alum

For the expression, try:

float(!TABLICAS.ogółem!)
JoshuaBixby
MVP Esteemed Contributor

You often can't, and really never should, convert a field type in place.  Create a new field of the data type you want, and then use the corresponding type cast to convert the data from string to a numeric value.