Data Studio
2.1K members online now
2.1K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Creating new field based on existing Boolean field

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

I'm trying to create a new field inside Data Studio based off a boolean field (named "BDR_Qualified__c") and keep getting the error "Invalid formula." I'm pretty certain my formula is correct... what could be the problem?

 

CASE WHEN BDR_Qualified__c THEN 1 END

Creating new field based on existing Boolean field

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Try: CASE WHEN BDR_Qualified__c=true THEN 1 END 

You can also cast to a numeric value and then compare it which would be BDR_Qualified__c as NUMERIC, which will give you 0, 1, I think.

Creating new field based on existing Boolean field

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

I have the same problem. Doing 

CASE WHEN Delivered THEN 1 ELSE 0 END

 

or 

CASE WHEN Delivered=true THEN 1 ELSE 0 END

 

where Delivered is a boolean, causes an "Invalid formula" error. 

 

Changing Delivered to be text (and checking ="TRUE") or to a number (and checking = 1) works.