5 Replies Latest reply on Jun 8, 2017 12:39 PM by Andrew goecke

    Calculating DateDiff function with single date dimension using other dimensions as filters

    Andrew goecke

      I need to take the difference in dates based on a few specifications within my data set.  I need to have the date difference based on a single date column, using an identifier labeled transaction type and price, separated by customer number. The calculation will start with the date marked with a 'P' for purchase. Then I want to know to difference between the customer's Sale date, which is marked with a transaction type: 'S'. Now, multiple transactions can occur for a single customer, so I need the calculation to specify which Date:Type'P' and Date"Type'S' to use in the Date Diff formula based on similarities in price. The tricky part of this is that the price field does not line up exactly, often similar, but the purchase price and sales price usually differ by a dollar or so.

       

      I have attached my sample data and combined workbook. Thanks-Andrew

       

      If my explanation was not clear enough, I need the DateDiff between each record that is connected via color string in the screenshot below.