Reputation: 1098
I'm trying to create a CASE WHEN
statement in Google Data Studio. However, it not applying to my table. I tried a few combinations and nothing seems to work. It also says that the syntax is valid.
Upvotes: 2
Views: 1176
Reputation: 6471
It can be achieved using the 3 Calculated Fields below:
Needs Intervention
)COUNT(CASE
WHEN Absenteeism Avg in Days > 15 THEN "Needs Intervention"
ELSE NULL END)
Stable
)COUNT(CASE
WHEN Absenteeism Avg in Days <= 15 THEN "Stable"
ELSE NULL END)
Needs Intervention
/ Stable
)CASE
WHEN Absenteeism Avg in Days > 15 THEN "Needs Intervention"
ELSE "Stable"
END
Google Data Studio Report and a GIF to elaborate:
Upvotes: 3