Skip to main content
Version: 0.22.2

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 utterance: 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.
  • 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 source dataset is successfully subtracted from the target dataset, a success message appears in the chat history and the resulting dataset is shown in the display panel. 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