2 Replies Latest reply on Aug 13, 2018 10:14 PM by Mahfooj Khan

    How to create a line graph that compares previous year MTD vs current year MTD

    John Lee

      Hi, I have daily sales data starting from 2017 up until the most recent date (Aug 13th, 2018) which gets updates every day as sales numbers come in.

       

      I have created a line graph shown below which shows the Total month sales until August for 2017: orange line

      Also, a line graph that shows the MTD sales for August 2018: blue line

       

      To achieve this, I have created a filter called validation with the calculations:

      DATEPART('month',[Date])<=DATEPART('month',[Max Date in Data Set])

       

      The problem with the current graph is that it is comparing the entire sales data for August 2017 against MTD sales data for August 2018 which ends up making the August 2018 line (blue line) way lower than its counterpart.

       

      Now, I want to be able to compare the MTD sales for 2017 vs MTD sales for 2018, is there a way to achieve this?

       

      I have attached an example file of what I did using superstore sample data from 2012 to 2013 August 13th:

      Thank you