Skip to main content

Intersect

Intersect lets you create a new dataset from the common rows between two datasets.

Format

Intersect uses the following formats:

  • Intersect the datasets <dataset1> and <dataset2> and (keep | remove) all duplicates>

Parameters

Intersect uses the following parameters:

  • dataset1 (required). The first dataset to intersect with the second dataset.
  • dataset2 (required). The second dataset to intersect with the first dataset.
  • keep/remove all duplicates (optional). Whether you want to keep all duplicate values in the final dataset or remove them from it.

Output

If the two datasets are successfully intersected, the resulting becomes [dataset1]_Intersect.

Examples

Consider the following datasets, which represent sales in 2020 and 2021, respectively:

SalespersonVolume (units)Gross Sales
Tony1000$200,000
Raj1500$300,000
Gary1250$250,000
Emilee1375$275,000
Sarah1400$280,000
SalespersonVolume (units)Gross Sales
Tony900$180,000
Raj1500$300,000
Sam1200$240,000
Danny1000$200,000
Mariah1220$244,000

To intersect these two datasets into one (and keep the duplicates), enter Intersect Sales2020 and Sales2021.

The resulting dataset looks like this:

SalespersonVolume (units)Gross Sales
Tony1000$200,000
Raj1500$300,000
Feedback