Data Studio is now Looker Studio. Looker Studio is still free, with the same features you already know. Looker Studio Pro offers improved asset management for enterprises, new team collaboration capabilities, and access to technical support. Learn more.

COALESCE

Returns the first non-missing value found in a list of fields.

Sample usage

COALESCE(Field1, Field2, Field3)

Syntax

COALESCE(field_expression[, field_expression, ...])

Parameters

field_expression - a field or expression. All field_expressions must be of the same type.

Example

Suppose you are tracking multiple racers across multiple heats in a competition. Racers might sit out heats for various reasons. You want to create a FirstTime field that contains each racer's first results.

Here's the race data.

Racer

Heat1

Heat2

Heat3

Racer X   38.22 37.61
Racer Y 41.33   38.04
Racer Z 39.27 39.04 38.85

Use the following formula to grab the first non-null value from the Heat columns:

COALESCE(Heat1, Heat2, Heat3)

 

Results:

Racer

Heat1

Heat2

Heat3

FirstTime
Racer X null 38.22 37.61 38.22
Racer Y 41.33 null 38.04 41.33
Racer Z 39.27 39.04 38.85 39.27

 

Was this helpful?
How can we improve it?
true
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
true
true
true
102097
false
false