Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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, @Anonymous I made a typo. It's actually 4 values:
Oh wait, i didn't change the && to II. It worked! Thank you!!!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |