Skip to content

Instantly share code, notes, and snippets.

@phamquocbuu
Created November 19, 2019 07:43
Show Gist options
  • Save phamquocbuu/a08f2226370b5fb87010a9c1b42f7910 to your computer and use it in GitHub Desktop.
Save phamquocbuu/a08f2226370b5fb87010a9c1b42f7910 to your computer and use it in GitHub Desktop.
Case when then for custom field in Google Data Studio
CASE 
    WHEN age_pax<20 then "<19"
        WHEN age_pax<30 then "20-30"
WHEN age_pax<35 then "30-34"
WHEN age_pax<40 then "35-39"
WHEN age_pax<45 then "40-44"
WHEN age_pax<50 then "45-49"
WHEN age_pax<55 then "50-54"
    ELSE ">=55" 
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment