Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi Experts
trying to write the following if statement and as calculated column, but its not working as expected..
FLAGS = IF('ORANGE (FACT)'[CSA_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "Y", "CSA and CSE",
IF('ORANGE (FACT)'[CSE_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "N", "CSA Only",
IF('ORANGE (FACT)'[CSE_FLAG] = "N" && 'ORNAGE (FACT)'[CSE_FLAG] = "Y", "CSE Only","")))
Solved! Go to Solution.
Hi,
Use the Switch function and re-write your formula as below:
Flags (forum) =
SWITCH (
True (),
'ORANGE (FACT)'[CSA_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "Y", "CSA and CSE",
'ORANGE (FACT)'[CSE_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "N", "CSA Only",
'ORANGE (FACT)'[CSE_FLAG] = "N" && 'ORNAGE (FACT)'[CSE_FLAG] = "Y", "CSE Only")
If this solved your problem then please mark it as the solution so others can see it.
Best,
Yes, because I copied your typos 🙂 You use the same CSE_FLAG in the 2nd and 3rd arguments.
Corrected below:
Flags (forum) =
SWITCH (
True (),
'ORANGE (FACT)'[CSA_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "Y", "CSA and CSE",
'ORANGE (FACT)'[CSA_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "N", "CSA Only",
'ORANGE (FACT)'[CSA_FLAG] = "N" && 'ORNAGE (FACT)'[CSE_FLAG] = "Y", "CSE Only")
Hi,
Use the Switch function and re-write your formula as below:
Flags (forum) =
SWITCH (
True (),
'ORANGE (FACT)'[CSA_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "Y", "CSA and CSE",
'ORANGE (FACT)'[CSE_FLAG] = "Y" && 'ORANGE (FACT)'[CSE_FLAG] = "N", "CSA Only",
'ORANGE (FACT)'[CSE_FLAG] = "N" && 'ORNAGE (FACT)'[CSE_FLAG] = "Y", "CSE Only")
If this solved your problem then please mark it as the solution so others can see it.
Best,
Hi Mnedix dose not give the expected result
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 118 | |
| 106 | |
| 38 | |
| 28 | |
| 27 |