Looker Studio Skill
Complete guide for creating dashboards and calculated fields in Google Looker Studio.
Main Workflow
-
Identify the task type:
- Create calculated field → See function references
- Connect database → See
postgresql-connection.md - Create visualization → Follow best practices
-
For calculated fields:
- Determine the function type needed (date, text, aggregation, logic)
- Check the corresponding reference
- Test the formula in Looker Studio
Quick Syntax Reference
Most Used Functions
-- Subtract time (e.g., convert UTC to local)
DATETIME_SUB(date_field, INTERVAL 5 HOUR)
-- Simple conditional
IF(condition, value_if_true, value_if_false)
-- Multiple conditions
CASE
WHEN condition1 THEN result1
WHEN condition2 THEN result2
ELSE default_result
END
-- Default value if NULL
IFNULL(field, 'default_value')
-- Aggregations
SUM(field), AVG(field), MAX(field), MIN(field), COUNT(field)
-- Text
CONCAT(text1, text2), UPPER(text), LOWER(text)
-- Format date
FORMAT_DATETIME('%d/%m/%Y %H:%M', date_field)
Common Timezones
| Timezone | Code |
|---|---|
| US Eastern | America/New_York (UTC-5/-4) |
| US Pacific | America/Los_Angeles (UTC-8/-7) |
| UK | Europe/London (UTC+0/+1) |
| Central Europe | Europe/Berlin (UTC+1/+2) |
| Australia Sydney | Australia/Sydney (UTC+10/+11) |
| India | Asia/Kolkata (UTC+5:30) |
| Japan | Asia/Tokyo (UTC+9) |
Timezone Conversion
-- Simple method: subtract/add hours
DATETIME_SUB(utc_field, INTERVAL 5 HOUR)
-- With FORMAT for display
FORMAT_DATETIME('%Y-%m-%d %H:%M', DATETIME_SUB(field, INTERVAL 5 HOUR))
PostgreSQL/Supabase Connection
Recommended configuration:
- Host:
aws-X-REGION.pooler.supabase.com - Port:
5432or6543 - Username:
user.PROJECT_REF - SSL: Disabled (if causing certificate issues)
Limitations:
- Maximum 150,000 rows per query
- Only
publicschema - ASCII headers only
Available References
date-functions.md- DATETIME_ADD, DATETIME_SUB, EXTRACT, FORMAT_DATETIMEtext-functions.md- CONCAT, SUBSTR, REPLACE, REGEXP_EXTRACTaggregation-functions.md- SUM, AVG, COUNT, MAX, MIN, PERCENTILElogic-functions.md- CASE, IF, IFNULL, COALESCE, operatorsconversion-functions.md- CAST, data typespostgresql-connection.md- PostgreSQL/Supabase configurationresources.md- Courses, tutorials, official documentation
Best Practices
- Data source level calculated fields for reusability
- Use IFNULL to handle null values
- Avoid division by zero with
NULLIF(divisor, 0) - Limit data for better performance
- Use filters before complex aggregations