3 Replies Latest reply on Feb 23, 2018 3:12 PM by Manuel Velasquez

    Incremental and decremental count based on a date

    Radi Saran

       

      I have the following table in PSQL:

       

      NameStart_dateEnd Date
      aaa01/02/2017 05/03/2017
      bbb 03/05/2017 07/07/2017
      ccc02/01/201710/09/2017

       

      Desired Tableau output:

       

      Month/YearNumber of people

      Jan 2017

      1
      Feb 20172
      Mar 20173
      Apr 20173
      May 20172 (one person - aaa ,ended in May 2017)
      Jun 20172
      Jul 20171 (bbb ended in July 2017)
      And so on.....

       

      How do I create a calculated field that gives me the "Number of People"?

       

      Thanks!