10 Replies Latest reply on Sep 23, 2016 12:54 PM by todd peikin

    LOD with Dates - How do I include only the most recent date relative to another date?

    todd peikin

      I want to track how long it takes customers to buy an item after they view it on my website.

       

      I have the following pieces of data:

      Item#

      Customer#

      Date of View

      Date of Buy

       

      This would be simple if there was one view date and one buy date. However, if they bought the same item multiple times, I only want the most recent [Date of View] prior to the [Date of Buy]

      Below "Time to Buy" = [Date of Buy] - [Date of view]

       

      TableauLOD1.PNG

       

      I want to remove [Date of Buy] and [Date of View] from the viz and have an [Average Time to Buy] for each item. However, I want the average to be computed only from the most recent [Date of View] prior to the [Date of Buy}

      See example of what I am trying to do below. I tried various LOD expressions, but none worked the way I needed. Data source is attached. Please help. Thank you.

       

      TableauLODIdeal.PNG