Returns the country name for the specified geolocation.

## Sample usage

`TOCOUNTRY(Country Code)`

## Syntax

`TOCOUNTRY(X [,input_format])`

### Parameters

- `X` - A text field or expression, or a geo field or expression.
- `input_format` - format for text field `X`. Optional if `X` is correctly configured as a geo field.

## Input format

`TOCOUNTRY` accepts the following input formats if `X` is a text field:

- [COUNTRY_ISO_CODE](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
- [REGION_ISO_CODE](http://en.wikipedia.org/wiki/ISO_3166-2)

## Examples

| Example formula | Input | Output |
|---|---|---|
| ` TOCOUNTRY(Country Code) ` | PE | Peru |
| ` TOCOUNTRY(Region ID,'REGION_ISO_CODE') ` | US-CA | United States |

## Related resources

- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)