ArrayAggDistinct
Last updated
Was this helpful?
Last updated
Was this helpful?
The ArrayAggDistinct function identifies distinct non-null row values in a column or group and aggregates them into a single array.
ArrayAggDistinct(value, [direction])
Function arguments:
value
(required) The column containing values to join.
direction
(optional) The directional order to sort the column values.
âascâ
sorts values in ascending order.
âdescâ
sorts values in descending order.
When a direction isnât specified, Analytics Pro sorts values in the same order as the column referenced in the value argument. If the referenced column isnât sorted, Analytics Pro sorts values in ascending order by default.
ArrayAggDistinct([Product Type], âascâ)
For each grouping (grouped by order number) the ArrayAggDistinct function returns an array containing distinct non-null valuesâsorted in ascending orderâfrom the corresponding rows in the Product Type column.