5 Replies Latest reply on Aug 29, 2018 11:49 AM by Argha Dey

    Need help in creating a calculated field using tableau functions

    Argha Dey

      Hi,

       

      I have the following sample data.

      User
      Last login
      Site
      a118/28/2018y1
      a118/28/2018x1
      a118/28/2018x1
      b11y1
      b11y1
      b117/31/2018z1
      b117/31/2018z1
      c11x1
      c11x1
      c11z1

       

      Here there are 3 users, 'a11','b11' and 'c11'. Each of these users have access to sites 'x1','y1' and 'z1' as mentioned in the above table. 'Last Login' column is the date when each of these users ave last accessed a site which they have access to.  Null Value in 'Last login' refers that the particular user has never accessed that site.

       

      The requirement here is to create a new column 'Account Status' that will show the user account as

      --- 'Active' if the user has accessed all his/her sites.

      --- 'Partially Active' if user has accessed only few of his/her sites.

      --- 'Inactive' if user has not accessed any of his sites.

       

      Based on the above sample data, output should be as below.

      User
      Last Login
      Site
      Account Status
      a118/28/2018y1Active
      a118/28/2018x1Active
      a118/28/2018x1Active
      b11y1Partially Active
      b11y1Partially Active
      b117/31/2018z1Partially Active
      b117/31/2018z1Partially Active
      c11x1Inactive
      c11x1Inactive
      c11z1Inactive

       

      Please let me know how to achieve this "Account Status" field in tableau workbook.

       

      Thanks in advance.

       

      Regards,

      Argha