Forum Discussion
im_newbie_123
5 years agoFrequent Visitor
DAX Switch statement error
Column1 = SWITCH(True(),[ID] = "FH20-10","YES",[ID] = "FA30-10","YES",[ID] = "FA60-20","YES","NO") I am trying to create a caluclated column named "Column1" and is getting this error : Functi...
Fowmy
5 years agoSuper User
im_newbie_123
It seems your column [ID] returns a nontext value and you are comparing with text. You can convert to the text value and do the SWTICHCH like
Column1 =
VAR X = FORMAT([ID],"@") RETURN
SWITCH(True(),
X = "FH20-10","YES",
X = "FA30-10","YES",
X = "FA60-20","YES",
"NO"
)________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂