Week 23: How do Sales compare in the Current Period to the Previous

I’m back after a semi-extended leave, but hoping I have a good challenge for everyone.

I love working with Dates, and have come across all sorts of use cases for comparing like-wise periods of time. The challenge below covers a use-case of trying to compare a Custom Date range, to the same number of days previous period.

 

Requirements

  • User can select a Start and End date for the Current Period
  • The “Previous Period” contains the same number of days as the Current Period, and ends the Day before the Start Date
  • Both the “Current” and “Previous” Periods must be on the same Date Axis (No dual Axis!)
  • The Current Period must be distinguishable from the previous period
  • Must show the Current Period Range, as well as, the Prior Period Range

Data

You can superstore data on data.world.

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @VizWizBI, @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

3 thoughts on “Week 23: How do Sales compare in the Current Period to the Previous”

    1. This is well done, but i found a small bug. When i select Start date:01-07-16 and End date:30-06-17

      for previous period it is showing 02-07-15 to 30-06-16. Could you tell me why it is taking like this?

  1. Hi All,

    This is well done, but i found a small bug. When i select Start date:01-07-16 and End date:30-06-17

    for previous period it is showing 02-07-15 to 30-06-16. Could you tell me why it is taking like this?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top