Using Relative Date variables


Chartio’s relative date variables allow you to generate a custom date that can be used anywhere you would enter a date value. For an overview of of Relative Date Variables, see this article.

In this example, we will create a chart to compare this week’s sales to the previous week’s.

Chart end result goal

  1. Drag Cost into the Measures and Created Date into Dimensions. Change the time bucket on Dimensions to Week of. Drag Created Date into the Filters field and filter for the current week.

    Create a chart

  2. Create a second layer by clicking the plus sign next to Dataset 1.
  3. Click Merge Datasets in the Pipeline and change the Merge type to Union.
  4. Click the plus sign underneath Merge Datasets in the Pipeline and choose Filter Rows. Use the BUCKET function to return the month and year of the current month.

    Filter Rows in the Pipeline

Related Variables Help Articles

See more