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

CASE WHEN not working (invalid formula)

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hi

 

I'm trying to copy a calculated dimension from one data source to another. The data sources are literally the same except for a data source table naming difference. All fields are the same and all data within is named the same so, in theory, the calculations should be the same.

 

I've copied these formulas across to a different data source this morning and they all worked fine so I'm totally dumbfound as to why its giving me invalid formula now?

 

They are in essence:

 

CASE WHEN ( Source = 'A' OR Source = 'B' OR Source = 'C' ) then '(Not Charged)' else '(Charged)' END

 

CASE WHEN Source = 'A_1' THEN 'A' WHEN Source = 'B_1' THEN 'B' WHEN Source = 'C_1' THEN 'C' ELSE 'D' END

 

CASE WHEN DGRP_Name = 'A_(A1)' THEN 'A' WHEN DGRP_Name = 'B_(B2)' THEN 'B' ELSE 'C' END

 

Thanks

 

CASE WHEN not working (invalid formula)

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

+1 I've had this issue, too. I had to create a new report with new calculated metrics as a fix :\

CASE WHEN not working (invalid formula)

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

+1 I'm having this same issue. Trying to replicate the same calculated dimension in the same dashboard, but using a different data source. Everything set up to be identical, but see "Invalid formula" message. Please help!