Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |