Select to view content in your preferred language

Calculate a "Race Code" or "Ethnicity Code" field from a "Race" field that is string format

1284
10
Jump to solution
05-20-2025 05:55 PM
eallan
by
Occasional Contributor

I am trying to convert Race or Ethnicity values into a numeric code for them. For example, "White" would equal "0" , and "American Indian" would equal "1" , and "Latino" would equal "2", and so on and so forth.

I attached a screenshot and inbedded a photo below, that shows my attempt to do this, but I failed miserably. I've been looking online for over 1.5 hours now trying to find an answer or similar example I could go off of but have had no luck.

Screenshot 2025-05-20 172823.jpg

0 Kudos
10 Replies
eallan
by
Occasional Contributor

Holy moly,

I totally missed all these amazing responses this morning. Apologies for not getting back to yall sooner and THANK YOU ALL SO MUCH for the help!!! I have to end my workday soon so will get back to this tomorrow morning.