GROUP_PAIR

GROUP_PAIR

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:

Groups

Items

Groups

Items

group1

apple

group1

banana

group1

pear

group2

apple

group2

banana

group2

apple

group3

apple

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

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.

Groups

Item_PAIR

Groups

Item_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>(...)).