Any setup advice? I am trying to add climate zone information based on the City to the project. (ANSI/ASHRAE Standard 169-2020)
How to make an if: if the City name is the same, return the Climate zone. I also want to make a City Cost Index percentage to reference.



Hi Miquel
You’re on the right track; you just need to follow the Value & Name structure. In your example, it’s currently set up the other way around.
@steve
Its not allowing duplicate values,

okay, I'm not sure then but you can trick it a bit and say have 7.001 and on the other one has (7)
This is more or less what i want but it doesnot work

is that the full screenshot of the formula? Are you able to put the full screen if not
I updated the variable to be computed:

formula
if ([City] === "key west" || [City] === "naples" || [City] === "fort myers") {
climateZoneKey = "0A";
} else if ([City] === "death valley" || [City] === "needles") {
climateZoneKey = "0B";
} else if ([City] === "miami" || [City] === "tampa" || [City] === "orlando" || [City] === "jacksonville" || [City] === "new orleans" || [City] === "baton rouge") {
climateZoneKey = "1A";
} else if ([City] === "yuma" || [City] === "el centro" || [City] === "imperial") {
climateZoneKey = "1B";
} else if ([City] === "houston" || [City] === "dallas" || [City] === "austin" || [City] === "san antonio" || [City] === "atlanta" || [City] === "charlotte" || [City] === "memphis" || [City] === "jackson" || [City] === "birmingham") {
climateZoneKey = "2A";
} else if ([City] === "phoenix" || [City] === "las vegas" || [City] === "tucson" || [City] === "palm springs" || [City] === "mesquite") {
climateZoneKey = "2B";
} else if ([City] === "nashville" || [City] === "raleigh" || [City] === "richmond" || [City] === "norfolk" || [City] === "columbia" || [City] === "greenville" || [City] === "little rock" || [City] === "tulsa" || [City] === "oklahoma city") {
climateZoneKey = "3A";
} else if ([City] === "el paso" || [City] === "albuquerque" || [City] === "tucumcari" || [City] === "roswell") {
climateZoneKey = "3B";
} else if ([City] === "san diego" || [City] === "los angeles" || [City] === "long beach" || [City] === "santa barbara") {
climateZoneKey = "3C";
} else if ([City] === "new york" || [City] === "boston" || [City] === "philadelphia" || [City] === "washington dc" || [City] === "baltimore" || [City] === "pittsburgh" || [City] === "cincinnati" || [City] === "st louis" || [City] === "kansas city" || [City] === "indianapolis") {
climateZoneKey = "4A";
} else if ([City] === "las cruces" || [City] === "grand junction" || [City] === "pueblo") {
climateZoneKey = "4B";
} else if ([City] === "seattle" || [City] === "portland" || [City] === "eugene" || [City] === "olympia") {
climateZoneKey = "4C";
} else if ([City] === "chicago" || [City] === "detroit" || [City] === "cleveland" || [City] === "columbus" || [City] === "milwaukee" || [City] === "minneapolis" || [City] === "des moines" || [City] === "buffalo" || [City] === "rochester" || [City] === "portland maine") {
climateZoneKey = "5A";
} else if ([City] === "denver" || [City] === "colorado springs" || [City] === "salt lake city" || [City] === "boise" || [City] === "spokane" || [City] === "cheyenne") {
climateZoneKey = "5B";
} else if ([City] === "san francisco" || [City] === "oakland" || [City] === "sacramento" || [City] === "salem oregon") {
climateZoneKey = "5C";
} else if ([City] === "madison" || [City] === "grand rapids" || [City] === "syracuse" || [City] === "burlington" || [City] === "concord" || [City] === "bangor") {
climateZoneKey = "6A";
} else if ([City] === "billings" || [City] === "great falls" || [City] === "carson city" || [City] === "reno") {
climateZoneKey = "6B";
} else if ([City] === "duluth" || [City] === "marquette" || [City] === "fargo" || [City] === "bismarck" || [City] === "williston" || [City] === "rapid city") {
climateZoneKey = "7";
} else if ([City] === "fairbanks" || [City] === "juneau" || [City] === "anchorage" || [City] === "nome") {
climateZoneKey = "8";
} else {
climateZoneKey = "Climate zone not found for this US city";
}
I'm 100% sure that formula will not work. Is it working?
I know it’s a syntax problem on my end

Disregard the *1, *2 and so on. Change the number after the City to suit your Climate zone and put 1 into the Variables for that City
Copy and paste this and let me know.
([City Miami]*1)+([City Houston]*2)+([City Phoenix]*3)+([City Atlanta]*4)+([City LosAngeles]*5)+([City NewYork]*7)+([City Chicago]*10)+([City Denver]*11)