Page tree
Skip to end of metadata
Go to start of metadata

Syntax

GROUP_PAIR(<any>)

Description

Generates all unique pairs of the values of a group. These pairs are returned as a list.

This is a group series function.

Example

Given the following data:

GroupsItems
group1apple
group1banana
group1pear
group2apple
group2banana
group2apple
group3apple

First create a group using GROUPBY(#RawData!Groups)

Groups
group1
group2
group3

Then use the GROUP_PAIR(#RawData!Items). The results are all the combinations of possible pairs of the column represented as a list in relation to the GROUPBY() column.

GroupsItem_PAIR
group1["apple","banana"]
group1["banana","pear"]
group1["apple","pear"]
group2["apple","banana"]

 This function returns a list. If you require a JSON represented as a string, wrap this function in TOJSON (E.g., TOJSON(<function>(...)).

  • No labels