Forum Discussion
Anonymous
6 years agoNot applicable
variable + if stament
hello i'm trying to translate this python code into dax using variable def force(p๐
if p["Zones_A"] == "4" and p["Zone_C"] == "4":
return p["net"]
elif p["Zones_A"] == "4" and p["Z...
- 6 years ago
Anonymous , You need to try Switch(True(),
example
SWITCH(true(),
search("Red",[column1],1,0)>0 || search("Green",[column1],1,0)>0 ,"C1"
search("Yellow",[column1],1,0)<0 , "C1",
blank()
)Also, it can only one data type. so take care of that
amitchandak
6 years agoSuper User
Anonymous , You need to try Switch(True(),
example
SWITCH(true(),
search("Red",[column1],1,0)>0 || search("Green",[column1],1,0)>0 ,"C1"
search("Yellow",[column1],1,0)<0 , "C1",
blank()
)
Also, it can only one data type. so take care of that