6 Replies Latest reply on Dec 15, 2016 12:24 PM by navshree.chaudhry.0

    Tableau: Find min date after a given date


      I have two data sources in Tableau.

      DataSource1 contains:-Customer ID and enrollment date(no duplicates)

      DataSource 2 contains:- customer ids with purchase dates (multiple entries)

      some of these customers have been enrolled before with different branch codes so the Datasource 2 might contain purchase dates prior to customer enrollment dates.

      I need to find the first date of purchase after the enrollment date. Can anybody help.

      I created 2 calculated fields:-

      1. first billing date - MIN([Repnot Purchace Date])
      2. no-of-days-to-first-billing - DATEDIFF('day',ATTR([New Enrollmet Report (New Accounts Report)].[Enrolled date]),[first billing date])

      i want to do something like this with the first calculated field,

      find min(Purchase date) after [Enrolled date]

      can somebody help in modifying the 1st calculated field to do this.I couldn't find any function. I tried using {fixed} but the dates should be from same data source. Also i don't want to do any window calculations since that would be of no use to me.

      Please help


      My original data contains confidential info so i attached a modified similar file.