Time Comparisons

Whenever you have time series data, a natural question is “how does this compare” with a previous period, or the same period a previous year. 

Zing Data now supports time comparisons versus previous periods, allowing you to easily visualize values relative to previous time periods in just one tap.

Adding a comparison

To add a time comparison to your chart or data table, simply:

  1. Locate the filter or conditions area for your chart. Click the ’+’ icon to add a new condition.

  2. From the menu that appears, select “Add condition and compare”. This will open the interface for setting up your time-based comparison.

  3. Configure your time comparison:

    • First, select the date/time field you wish to analyze (e.g., event_time).
    • Next, define the primary time range for your data. You can choose from options like:
      • Relative past dates (e.g., “Past 60 days”, “Previous 12 months”)
      • Specific date ranges (e.g., “After a date”, “Between two dates”)
      • Relative future dates (e.g., “Next 24 hours”, “Next two quarters”)
      • Relative past to future dates (e.g., “Past 7 days to next 7 days”)
    • Ensure the Compare toggle is switched ON.
    • Finally, select your desired comparison type:
      • vs Previous period: This compares your selected time range with the immediately preceding period of the same duration. For example, if you selected “Past 60 days”, this would compare it to the 60 days prior to that period. If you chose March 15 - March 25 (10 days), the previous period comparison would be March 5 - March 15.
      • vs Same period last year: This compares your selected time range with the exact same date range from the previous year. For example, if you selected March 15, 2023 - March 25, 2023, this option would compare it to March 15, 2022 - March 25, 2022.

Relative dates into the future dates can be useful for looking at forecasts and having a ‘rolling’ period which always shows data relative to the time the question is run.

A comprehensive solution for time series data

This new time comparisons capability makes it possible to easily see trends versus historical (previous period or previous year) data.

Often you’ll also want to know when new and relevant data differs from historical levels – such as spike or dips that requires your attention. Zing’s alerting feature makes it possible to get up proactive push notification or email alerts when new data goes above a threshold you set, drops below a threshold you set, changes by some amount, or changes by some percentage.

Once you’re alerted about an important change, you can simply tap on a chart’s line, bar, or the row of a table to drill down into that specific data point, and apply additional cuts of by other fields to inform you about the likely causes of the change.

This works for any date or date/time field, across all data sources - Postgres, mySQL, Snowflake, Databricks, BigQuery, CSV, Excel, Google Sheets, Clickhouse, Redshift, MariaDB, and SQL Server.

Next steps

This time comparisons capability is live for all users of Zing, and we’re adding time comparisons into our Natural Language Querying capabilities as well.

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo