Skip to main content

Subtract

Subtract is the opposite of Concatenate and lets you remove the common rows between two datasets, keeping only the unique rows.

Format

Subtract uses a single format: Subtract the dataset <source dataset> from the dataset <target dataset> and (keep | remove) all duplicates.

Parameters

Subtract uses the following parameters:

  • source dataset (required). The dataset to subtract from the target dataset.
  • target dataset (required). The dataset from which the source dataset should be subtracted.

Output

If the source dataset is successfully subtracted from the target dataset, a success message appears in the conversation history and the resulting dataset is shown in the Data tab. Otherwise, an error message is shown.

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 subtract the 2020 dataset from the 2021 dataset (and keep the duplicates), enter Subtract the dataset Sales2020 from the dataset Sales2021 and keep all duplicates.

The resulting dataset looks like this:

SalespersonVolume (units)Gross Sales
Sam1200$240,000
Danny1000$200,000
Mariah1220$244,000