1 Reply Latest reply on Mar 22, 2018 3:35 PM by Victor S

    Date-range with two date-fields and apply calculation on it

    Victor S

      Hi,

       

      I'm new to Tableau and trying to figure out how to work with date-ranges in two different date fields and apply a calculation on all the data on each day in the range.

       

      My data looks like this:

       

      IDEnrollmentCancellation...
      101.01.200002.02.2018
      205.05.2005NULL
      310.10.201012.12.2011
      .........

       

      I want to create a chart with all dates on the x-axis (01.01.2000 -> 12.12.2011) and calculate how many people were enrolled at any given date:

       

      Enrollment <= X-Axis Date < Cancellation || Enrollment <= X-Axis Date && Cancellation = NULL

       

      I was thinking about creating a second table in Excel containing all the days and all ID's which are still enrolled and add them with a joint..

      But I think there has to be a easier solution and I'm just too stupid to see it.

       

      I appreciate any help.