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
Greetings!
I am trying to use a Switch statement to populated a column with values. IT only evaluates the first part and not the second. This leaves me with a column of 1's and blanks instead of 1's, 2's and blanks. Any ideas what I am doing worng?
Thanks
Solved! Go to Solution.
Hi @Nick555
You can try this code:
TEST =
SWITCH(
TRUE(),
'Sheet1'[COVRG_CD] in {"X1","Y1","Z1"}=FALSE() && 'Sheet1'[PLAN_TYPE] = "10", "1",
'Sheet1'[COVRG_CD] in {"X1","Y1","Z1"} && 'Sheet1'[PLAN_TYPE] = "10" && 'Sheet1'[Dependent ID] <> BLANK(), "2",
BLANK()
)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Many Thanks! This worked perfectly!
Hi @Nick555
You can try this code:
TEST =
SWITCH(
TRUE(),
'Sheet1'[COVRG_CD] in {"X1","Y1","Z1"}=FALSE() && 'Sheet1'[PLAN_TYPE] = "10", "1",
'Sheet1'[COVRG_CD] in {"X1","Y1","Z1"} && 'Sheet1'[PLAN_TYPE] = "10" && 'Sheet1'[Dependent ID] <> BLANK(), "2",
BLANK()
)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |