2 Replies Latest reply on Oct 13, 2016 2:27 PM by Dan Burrell

    Filtering based on a minimum date of a record

    Dan Burrell

      Hi everyone


      Been a tableau user for a while, just can't seem to get my head around the following problem.


      I have a series of records that have an overarching customer number, that customer has many product so data looks like the following:

      The products have a category based on independent logic ( its actual a location they bought the product characteristic )


      Header 5


      What I want to do is Identify the customer based on the Category is is their oldest or min(date)

      So in the above case the customer would be in the DrinkBottle Category due to the date.


      I want to represent that DrinkBottle applies to the customer as a whole.... using the minimum date.


      How can I do this?


      Workbook attached with dummy data



        • 1. Re: Filtering based on a minimum date of a record
          Ivan Young

          Hi Dan,

          Check out the three calculated fields below.   I think one could work for you.




          First Customer Event: {FIXED [Customer] : MIN(DATE) } = [Date]  - Drag to filters and select true, this will filter to the Min customer record and return the row below.




          Alternately you could do something like this.


          First Category: IF {FIXED [Customer] : MIN(DATE) } = [Date] THEN [Category] END - This will return 'DrinkBottle' for the row with date = 01/02/2016 and null for the other rows.


          If you want to create a field that will populate all customer ABCD rows with 'DrinkBottle' then {FIXED [Customer] : MIN(First Category) }

          • 2. Re: Filtering based on a minimum date of a record
            Dan Burrell

            Excellent Ivan. I will give this a bit of a go and report back


            Thank you!