March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
202 | |
137 | |
106 | |
70 | |
68 |