Joins the distinct values in a column into a single value. Each window of values within a column will be combined into a single list of values.

Usage

ListAggDistinct(column, separator, direction)

column (required) The column of values that you would like to combine.

separator (optional) The separator to use between values. If no separator is specified, a comma will be used.

direction (optional) The sort direction to use for the list. Either 'asc' or 'desc'. I no direction is specified, the values will be sorted in ascending order. 

Example

ListAggDistinct([Account Owners], "-", "desc")
  • In each group, all distinct values from the column [Account Owners] will be combined and listed in a single row, separated by a dash and sorted into descending alphabetical order.

See Also

ListAgg
Concat