3 Replies Latest reply on Aug 5, 2018 3:15 PM by Felix Surjadjaja

    Creating custom "Current Month Start" and "Current Month End" fields, and populating information

    Felix Surjadjaja

      Hello,

       

      I am new to Tableau, and I am trying to create a summary of the number of IDs who are active and quit for each month in 2018 (as shown below) based on the data of the attached Excel workbook:

      idealOutput.jpg

      How can I make this happen in Tableau?

       

      I have tried creating a custom field for each month (i.e. [Current Month Start] = "2018-01-01" and [Current Month End] = "2018-01-31" for January), and insert the following calculation:

      IF (isnull([Date Quit]) OR [Date Quit] > [Current Month End] ) AND ([Date Join] < [Current Month Start])

      THEN "Active"

      Elif [Date Quit] >= [Current Month Start] & [Date Quit] <= [Current Month End]

      THEN "Quit"

      ELSE ""

      END

      But it always gives me an error.

       

      Thank you