Skip to main content
All CollectionsReference
Aggregate Functions
Aggregate Functions
S
Written by Steve Olson
Updated over 2 years ago

Aggregate Functions

Item

Description

Summary:
Extracts a non-null and non-missing value from a specified column. If all values are missing or null, the function returns a null value.

Summary:Selects a single non-null value from rows in each group that meet a specific condition.

wrangle;language;reference;function;aggregate;row;any;anyif;wrangle_function_anyif;pivot;

Summary:
Computes the approximate median from all row values in a column or group. Input column can be of Integer or Decimal.

:

Transformation Name

New formula

Parameter: Formula type

Single row formula

Parameter: Formula

average(Scores)

Output: GeneratePAggregate Fuancross an entire columns a nl values in the Scres column.

Transformation Name

Pivot columns

Parameter: Values

average(Score)

Parameter: Max number of columns to create

1

Outut: Genhe Scos column. The limit de generated.

Summary:NOTE: When to reshape the dataset. See below.


Aggregate functions perform a computation against a set of values to generate a single result. For example, you could use an aggregate function to compute the average (mean) order over a period of time. Aggregations can be applied as standard functions or used as part of a transformation step to reshape the data.

See: As within a column: more information on the transformation, see Data.

Aggregate n be used with the piot transformation to changta. Example:

Transformation Name

Pivot columns

Parameter: Row labels

StudentId

Parameter: Values

average(Score)

Parameter: Max number of columns to create

1

In the above instance, the resultinumns:

  • studentId - one row for each distinct student ID vaue

  • - avre by each student (studentId)

NOTE: You cannot use aggregate functions inside of conditionate to true or false.

A formation can includt.

Fo.

Keywords: dew column containing the average of aloper;aates single-column tablye with a single value, which cont;dains the a_anverage of alyll vues in t;refiners the maximum number of columns that can be;aggregate; function;s a appled as rart of a pivot transformation, thecy typicilly invol multiple papmeters as part of an ope;tioavgregate across groups of vauerags ce;wrangl the ste_fuucture of your dncti datasont contains two _verage_Scoreaverage;rage scollapse;cols that evaluapivot transe_ multiple aggregate functiow;ns and group;o columns frm the pre-aggregate dataser;pivot;

NOTE: Null values are ignored as inputs to these functions.

These aggregate functions are available:

Topics:

Did this answer your question?