Big Number Chart
  • 10 Mar 2023
  • 2 Minutes to read
  • Dark
    Light

Big Number Chart

  • Dark
    Light

Article summary

Big Number and Big Number with Trendline Charts

The Big Number chart lets you emphasize an important aggregate metric or KPI (key performance indicator). The Big Number with Trendline chart helps youemphasize the recent state of your aggregate metric and want to showcase a trendline. Here are some examples of both charts.


Reference Content

If you're new to visualizing data in Preset, we recommend the following reference articles:

Creating a Big Number Chart

To create a basic Big Number chart, you need to define:

Time (optional)
  • You can specify a time range that will be used when calculating the aggregate metric that is visualized. The time grain isn't included in the visualization for the Big Number chart.
Metric (required)
  • At the core, this chart shows an aggregate metric as a single number.
  • You are required to choose a column and an aggregate function you want applied to that column. Some examples:
    • COUNT_DISTINCT(ride_id): # of distinct rides
    • AVG(rides): average # of rides

Filters (optional)

  • You can add filtering criteria to narrow down the rows / data used for computing the aggregate metric.

Subheader (optional)

  • You can define the subheader text that goes under the big number itself

Click Create Chart or Update Chart to generate the queries, run the queries, and visualize the results.

Creating a Big Number with Trendline Chart

If you instead want to emphasize the recent state of your aggregate metric and want to showcase a trendline, you can use the Big Number with Trendline chart instead.

Time (optional)
  • You can specify a time range that will be used when calculating the aggregate metric that is visualized. 
  • The time grain you choose here is crucial, as it will be used for generating the trendline by comparing the last X periods.
Metric (required)
  • At the core, this chart shows an aggregate metric as a single number.
  • You are required to choose a column and an aggregate function you want applied to that column. Some examples:
    • COUNT_DISTINCT(ride_id): # of distinct rides
    • AVG(rides): average # of rides

Filters (optional)

  • You can add filtering criteria to narrow down the rows / data used for computing the aggregate metric.

Options

  • Comparison Period Lag: the # of periods (using the time grain you chose earlier). The options we chose here will generate a trendline for the last 30 days, on a day-by-day basis.
  • Show Trend Line: if ticked, shows the trendline.
  • Start Y-axis at 0: if ticked, starts y-axis at 0 instead of the lowest value in the dataset.

Click Create Chart or Update Chart to generate the queries, run the queries, and visualize the results.

Here's the SQL query that was generated by Preset:

SELECT DATE_TRUNC('DAY', started_at) AS "__timestamp",
       count(DISTINCT ride_id) AS "COUNT_DISTINCT(ride_id)"
FROM dbt_smukherjee.citibike_trips
WHERE started_at >= '2022-04-01 00:00:00.000000'
  AND started_at < '2022-05-01 00:00:00.000000'
  AND member_casual = 'member'
GROUP BY DATE_TRUNC('DAY', started_at)
LIMIT 5000

Was this article helpful?

What's Next