I’m trying to convert a four-digit numerical code to a four-digit (one letter + 3 numbers) with a CASE clause in Data Studio. The four-digit numerical code is being pulled out of a Sheets file. I keep getting an error that says “Invalid formula – Operator “=” doesn’t support NUMBER = TEXT. Operator “=” supports ANY = ANY.” I’m assuming the one letter is messing everything up. Any ideas of how to fix this?
Current formula:
CASE WHEN store_identifier = '1234' THEN 'D111' END
Advertisement
Answer
The error is pretty clear. The identify is a number, so drop the single quotes:
(CASE WHEN store_identifier = 1234 THEN 'D111' END)