Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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 |
---|---|
77 | |
75 | |
67 | |
65 | |
47 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |