Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm trying to create a calculated column based on an existing column and using IF and OR statements to change 3 values. It doesn't seem to work if I have different if values. I even tried SWITCH but it doesn't seem to work with a column as the <else> value.
Solved! Go to Solution.
Hi @Anonymous
Not sure if I understand it correctly, if Project ID = 50323 or 50279 then Project A else if Project ID = 12347 then Affiliate else Focus Area? As you have 12347 twice, so just put one...
FA =
SWITCH (
TRUE (),
'ProgramIntermediate'[Project ID] = "50323"
|| 'ProgramIntermediate'[Project ID] = "50279", "Project A",
'ProgramIntermediate'[Project ID] = "12347", "Affiliate",
'ProgramIntermediate'[Focus Area]
)
Hi @Anonymous
Not sure if I understand it correctly, if Project ID = 50323 or 50279 then Project A else if Project ID = 12347 then Affiliate else Focus Area? As you have 12347 twice, so just put one...
FA =
SWITCH (
TRUE (),
'ProgramIntermediate'[Project ID] = "50323"
|| 'ProgramIntermediate'[Project ID] = "50279", "Project A",
'ProgramIntermediate'[Project ID] = "12347", "Affiliate",
'ProgramIntermediate'[Focus Area]
)
Sorry, @Vera_33 I made a typo. It's actually 4 values:
Oh wait, i didn't change the && to II. It worked! Thank you!!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.