Is there a formula to do the contrary of TOCOUNTRY()? Link to formula documentation
I have the country names, but need the 2-digit country codes.
Solved! Go to Solution.
Hi there,
as far as I know, it is not possible to do it in the opposite way. Probably you need to create a customer dimension like this:
CASE
WHEN ${country_field} = "United States" THEN "US"
WHEN ${country_field} = "Canada" THEN "CA"
WHEN ${country_field} = "United Kingdom" THEN "GB"
WHEN ${country_field} = "France" THEN "FR"
WHEN ${country_field} = "Germany" THEN "DE"
-- etc
ELSE "Unknown"
END
Kind regards,
Krassi
Hi there,
as far as I know, it is not possible to do it in the opposite way. Probably you need to create a customer dimension like this:
CASE
WHEN ${country_field} = "United States" THEN "US"
WHEN ${country_field} = "Canada" THEN "CA"
WHEN ${country_field} = "United Kingdom" THEN "GB"
WHEN ${country_field} = "France" THEN "FR"
WHEN ${country_field} = "Germany" THEN "DE"
-- etc
ELSE "Unknown"
END
Kind regards,
Krassi