Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
Good Day!
I am trying to create a new column that will give me the results below. i tried using the nested ifs or the switch function but is not working. i might have been doing it wrong. below is the data i am working on.
if Regionname = Anz, India, Philippines Then "APAC"
if Regionname = Bulgaria, Denmark, France, Germany, Greece, Ivory Coast, Morocco, Netherlands, Poland, Portugal, Senegal, Serbia, Spain, UK Then "EMEA"
if Regionname =Canada, US Then "NA"
if Regionname = Colombia, Mexico, Nicaragua, Panama Then "LATAM"
if Regionname =At Home then "W@H"
else Regionname
Thank you so much for the feedback and solutions. 🙂
Solved! Go to Solution.
Hi @gheecalipes25 ,
Thy this formula:
I'd recommend a SWITCH.
Either like this:
Column =
SWITCH (
TRUE (),
Regionname IN { "Anz", "India", "Philippines" }, "APAC",
Regionname
IN {
"Bulgaria",
"Denmark",
"France",
"Germany",
"Greece",
"Ivory Coast",
"Morocco",
"Netherlands",
"Poland",
"Portugal",
"Senegal",
"Serbia",
"Spain",
"UK"
}, "EMEA",
Regionname IN { "Canada", "US" }, "NA",
Regionname IN { "Colombia", "Mexico", "Nicaragua", "Panama" }, "LATAM",
Regionname = "At Home", "W@H",
Regionname
)
Or like this:
Column =
SWITCH (
Regionname,
"Anz", "APAC",
"India", "APAC",
"Philippines", "APAC",
"Bulgaria", "EMEA",
"Denmark", "EMEA",
"France", "EMEA",
"Germany", "EMEA",
"Greece", "EMEA",
"Ivory Coast", "EMEA",
"Morocco", "EMEA",
"Netherlands", "EMEA",
"Poland", "EMEA",
"Portugal", "EMEA",
"Senegal", "EMEA",
"Serbia", "EMEA",
"Spain", "EMEA",
"UK", "EMEA",
"Canada", "NA",
"US", "NA",
"Colombia", "LATAM",
"Mexico", "LATAM",
"Nicaragua", "LATAM",
"Panama", "LATAM",
"At Home", "W@H",
Regionname
)
I'd recommend a SWITCH.
Either like this:
Column =
SWITCH (
TRUE (),
Regionname IN { "Anz", "India", "Philippines" }, "APAC",
Regionname
IN {
"Bulgaria",
"Denmark",
"France",
"Germany",
"Greece",
"Ivory Coast",
"Morocco",
"Netherlands",
"Poland",
"Portugal",
"Senegal",
"Serbia",
"Spain",
"UK"
}, "EMEA",
Regionname IN { "Canada", "US" }, "NA",
Regionname IN { "Colombia", "Mexico", "Nicaragua", "Panama" }, "LATAM",
Regionname = "At Home", "W@H",
Regionname
)
Or like this:
Column =
SWITCH (
Regionname,
"Anz", "APAC",
"India", "APAC",
"Philippines", "APAC",
"Bulgaria", "EMEA",
"Denmark", "EMEA",
"France", "EMEA",
"Germany", "EMEA",
"Greece", "EMEA",
"Ivory Coast", "EMEA",
"Morocco", "EMEA",
"Netherlands", "EMEA",
"Poland", "EMEA",
"Portugal", "EMEA",
"Senegal", "EMEA",
"Serbia", "EMEA",
"Spain", "EMEA",
"UK", "EMEA",
"Canada", "NA",
"US", "NA",
"Colombia", "LATAM",
"Mexico", "LATAM",
"Nicaragua", "LATAM",
"Panama", "LATAM",
"At Home", "W@H",
Regionname
)
Hi @gheecalipes25 ,
Thy this formula:
Thank you.. it worked. 🙂
User | Count |
---|---|
98 | |
89 | |
82 | |
70 | |
67 |
User | Count |
---|---|
115 | |
104 | |
101 | |
72 | |
64 |