Snapshot Datasets: Comparing Instances

The following article describes how to track changes in paired datasets instances.

This article answers the following questions:

PREREQUISITES:

Video Tutorial

This option is only available for Views of Snapshot Datasets

If in the Dataset Editor > Data tab the Snapshot dataset? field is set to 'yes', than in the Dataset Viewer you have the following options available to you:

  • Reviewing a Single Instance of this Dataset (for example, yesterday), or
  • Tracking changes in the Last Two Instances of this Dataset (for example, yesterday's data compared to what we saw the day before yesterday).

NOTE: You can compare ANY instance saved during previous data collections to its instance collected the day before.

1. Choose the date which you want to compare to the prior one

Example: In the given example we choose the instance collected on Saturday 12/17/2016, meaning that it will automatically be compared to the instance collected prior to it on Friday 12/16/2016.

2. Tracking New and Removed rows

  1. Select Last Two Instances mode
  2. The Track Changes option is now available for use
  3. You can now specify whether you want to see what fields have been added to the instance, which of the fields have been removed or both since prior period
  4. Id fields:
  5. Click Apply Changes to update the Results

Only those rows where the values defined in Id fields have been changed/added/removed since collecting the prior instance are going to be shown.

Use case: If there are no rows in the Result set

In the example above, values from the calendar_date column are going to be new every day, since it includes values collected for a new day; values from units and sales are also highly likely to be different, unless the same amount of product units has been purchased or the sum of sales for current period is identical to the sum of sales for the prior period. But let's compare instances by values in channel and country columns:

New sales have been made in all countries and by all channels, but values in country and channel columns remained the same (Country = Australia, canada, France, Germany, etc.; Channel = corporate sales, store visit, website visit, e-mail marketing), so the system has no changes to display in the Results set.

3. Defining additional filters

  1. Filters allow defining additional criteria to compare current and prior values by various conditions. NOTE: Current and prior filters are shown only in the Track Changes mode.
  2. If we apply additional filters to the results set, we should choose unchanged parameters (as in the example above) in the Id fields section. Let's review this condition on the following example:

3.1. Simple Filter criteria

Use Case: Include rows if the sales in any country have increased by any amount over the prior day.

  1. By field: Select the field with constant (or unchanged) values. This field will serve as a basis for comparing other changed values. The Id fields are Channel and Country (i.e. you are looking for changes when Channel and Country are unchanged)
  2. Click [+ Rule].
  3. Define the parameters for comparing current and previous values from the drop-down lists.
  4. Apply changes to update the Results set

You may add more rules to the filters.

You may create a separate View out of this data slice by clicking Save as View at the top of the page.

3.2. Compound Filter criteria

Use Case: Include rows if units sold via 'website visit' channel have increased over the prior day OR if sales made via 'website visit' channel are 10% higher than over the prior day.

You want the key fields across which changes will be tracked included in the Select Field list.  In this example, you should select ONLY Channel, Country, units, and sales for inclusion in the display.

  1. By field: Select the field with constant (or unchanged) values. The Id fields should be Channel and Country (i.e. you are looking for changes when Channel and Country are unchanged)
  2. Define filters: Then you can apply filters. In our use case, this consists of 2 groups of conditions: click [+ Group] and define criteria for the first and second group:
    • [Group 1]: units increased in 'website visit' channel
    • [Group 2]: sales are 10% higher in 'website visit' channel
  3. Choose OR filter to define relations between the Groups
  4. Apply changes to update the Results

You may create a separate View out of this data slice by clicking Save as View at the top of the page.

0 Comments

Add your comment

E-Mail me when someone replies to this comment