5 Replies Latest reply on Mar 30, 2016 11:52 AM by Joel Hughes

    Latest value calculation by customer id and date

    Joel Hughes

      From a set of customer data, I'm looking to find the last purchase in 2015 and the last purchase in 2016 and find the difference between the two. For example, in the attached workbook customer 5687 made two purchases in 2015 ($114.11 in February and $100.98 in August) and one purchase in 2016 ($82.88 in March). What I'm looking to accomplish in this example is to calculate $100.98 - $82.88, and for that same calculation to happen across the entire dataset. In some cases, customers will only have purchases in 2015, and in other cases customers will only have purchases in 2016.


      Any help would be appreciated. Thank you!