Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 :
Function 'SWITCH' does not support comparing values of type Text with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values.
Any help would be highly appreciated.
Thanks in advance
@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 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 18 | |
| 12 | |
| 11 |