Intersect
Intersect
lets you create a new dataset from the common rows between two datasets.
Format
Intersect
uses a single format: 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:
Salesperson | Volume (units) | Gross Sales |
---|---|---|
Tony | 1000 | $200,000 |
Raj | 1500 | $300,000 |
Gary | 1250 | $250,000 |
Emilee | 1375 | $275,000 |
Sarah | 1400 | $280,000 |
Salesperson | Volume (units) | Gross Sales |
---|---|---|
Tony | 900 | $180,000 |
Raj | 1500 | $300,000 |
Sam | 1200 | $240,000 |
Danny | 1000 | $200,000 |
Mariah | 1220 | $244,000 |
To intersect these two datasets into one (and keep the duplicates), enter Intersect Sales2020 and Sales2021
.
The resulting dataset looks like this:
Salesperson | Volume (units) | Gross Sales |
---|---|---|
Tony | 1000 | $200,000 |
Raj | 1500 | $300,000 |