Forum Discussion
Switch statement when multiple conditions are applied
- Anonymous4 years ago
Hi akhaliq7 .
You can create a measure like;
Availability=
var a=SELECTEDVALUE(Table[Product Stock])
var b=SELECTEDVALUE(Table[Product Availibility)
return
SWITCH(
TRUE(),a="1-10" && b="Y","Low stock",
a="11-50" && b="Y" ,"Mid Level stock",
a="50-100" && b="Y" ,"High Level stock").
Let me know if that works.
Thanks,
Sanket
If this post helps, then mark it as 'Accept as Solution' and give it a thumbs up.
Hi akhaliq7 .
You can create a measure like;
Availability=
var a=SELECTEDVALUE(Table[Product Stock])
var b=SELECTEDVALUE(Table[Product Availibility)
return
SWITCH(
TRUE(),a="1-10" && b="Y","Low stock",
a="11-50" && b="Y" ,"Mid Level stock",
a="50-100" && b="Y" ,"High Level stock").
Let me know if that works.
Thanks,
Sanket
If this post helps, then mark it as 'Accept as Solution' and give it a thumbs up.
thanks your solution worked only thing I changed was instead of a="1-10" i did a>=1 && a<= 10 && b="N".