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:
5432 or 6543
- Username:
user.PROJECT_REF
- SSL: Disabled (if causing certificate issues)
Limitations:
- Maximum 150,000 rows per query
- Only
public schema
- ASCII headers only
Available References
date-functions.md - DATETIME_ADD, DATETIME_SUB, EXTRACT, FORMAT_DATETIME
text-functions.md - CONCAT, SUBSTR, REPLACE, REGEXP_EXTRACT
aggregation-functions.md - SUM, AVG, COUNT, MAX, MIN, PERCENTILE
logic-functions.md - CASE, IF, IFNULL, COALESCE, operators
conversion-functions.md - CAST, data types
postgresql-connection.md - PostgreSQL/Supabase configuration
resources.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
1---2name: looker-studio3description: Skill for creating dashboards and calculated fields in Google Looker Studio (formerly Data Studio). Use when the user: - Needs help with formulas or calculated fields in Looker Studio - Wants to connect Looker Studio to PostgreSQL/Supabase - Needs to create visualizations or dashboards - Asks about function syntax (CASE, IF, DATETIME, etc.) - Wants to convert timezones or format dates - Needs to blend data from multiple sources4---56# Looker Studio Skill78Complete guide for creating dashboards and calculated fields in Google Looker Studio.910## Main Workflow11121. **Identify the task type:**13 - Create calculated field → See function references14 - Connect database → See `postgresql-connection.md`15 - Create visualization → Follow best practices16172. **For calculated fields:**18 - Determine the function type needed (date, text, aggregation, logic)19 - Check the corresponding reference20 - Test the formula in Looker Studio2122## Quick Syntax Reference2324### Most Used Functions2526```sql27-- Subtract time (e.g., convert UTC to local)28DATETIME_SUB(date_field, INTERVAL 5 HOUR)2930-- Simple conditional31IF(condition, value_if_true, value_if_false)3233-- Multiple conditions34CASE35 WHEN condition1 THEN result136 WHEN condition2 THEN result237 ELSE default_result38END3940-- Default value if NULL41IFNULL(field, 'default_value')4243-- Aggregations44SUM(field), AVG(field), MAX(field), MIN(field), COUNT(field)4546-- Text47CONCAT(text1, text2), UPPER(text), LOWER(text)4849-- Format date50FORMAT_DATETIME('%d/%m/%Y %H:%M', date_field)51```5253### Common Timezones5455| Timezone | Code |56|----------|------|57| US Eastern | `America/New_York` (UTC-5/-4) |58| US Pacific | `America/Los_Angeles` (UTC-8/-7) |59| UK | `Europe/London` (UTC+0/+1) |60| Central Europe | `Europe/Berlin` (UTC+1/+2) |61| Australia Sydney | `Australia/Sydney` (UTC+10/+11) |62| India | `Asia/Kolkata` (UTC+5:30) |63| Japan | `Asia/Tokyo` (UTC+9) |6465### Timezone Conversion6667```sql68-- Simple method: subtract/add hours69DATETIME_SUB(utc_field, INTERVAL 5 HOUR)7071-- With FORMAT for display72FORMAT_DATETIME('%Y-%m-%d %H:%M', DATETIME_SUB(field, INTERVAL 5 HOUR))73```7475## PostgreSQL/Supabase Connection7677**Recommended configuration:**78- Host: `aws-X-REGION.pooler.supabase.com`79- Port: `5432` or `6543`80- Username: `user.PROJECT_REF`81- SSL: Disabled (if causing certificate issues)8283**Limitations:**84- Maximum 150,000 rows per query85- Only `public` schema86- ASCII headers only8788## Available References8990- `date-functions.md` - DATETIME_ADD, DATETIME_SUB, EXTRACT, FORMAT_DATETIME91- `text-functions.md` - CONCAT, SUBSTR, REPLACE, REGEXP_EXTRACT92- `aggregation-functions.md` - SUM, AVG, COUNT, MAX, MIN, PERCENTILE93- `logic-functions.md` - CASE, IF, IFNULL, COALESCE, operators94- `conversion-functions.md` - CAST, data types95- `postgresql-connection.md` - PostgreSQL/Supabase configuration96- `resources.md` - Courses, tutorials, official documentation9798## Best Practices991001. **Data source level calculated fields** for reusability1012. **Use IFNULL** to handle null values1023. **Avoid division by zero** with `NULLIF(divisor, 0)`1034. **Limit data** for better performance1045. **Use filters** before complex aggregations