Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table, called gm_PPM, with a field [City]. I would like to create a new field, [Region], to group the cities within.
EXAMPLE: IF ([City] = 'Milwaukee','Chicago','New York', 'North America')
I want six region titles listed in the new [Region] field: 'North America', 'South America', 'Africa', 'Eurasia', 'Australia', 'China'
How do I create a new field in the table, called "Region?"
How do I hard-code groups Regions based on the cities from the [City] field?
Please Help.
You will then have to make a grouping for each region you want:
If (City = 'City1' or City = 'City2' or City = 'City3', 'Region 1',
If (City = 'City1' or City = 'City2' or City = 'City3', 'Region 2',
If (City = 'City1' or City = 'City2' or City = 'City3', 'Region 3'))) as Region,
and so on with all you need
If you want this in script level,
You can create a excel file with City and Region or Create a Inline Load with these two fields.
Then link with City.