5 Replies Latest reply on Jul 27, 2018 1:45 PM by Jim Dehner

    Data Prep - Condensing Multiple Entries into Single Header Rows

    Steve Wolfe

      Hello Tableau Community,


      We have a MSSQL table that has employee data on it. Each time there is a status change for the employee (they go to a new team, converted to full time, etc) they get a new record on the table. The data looks like the below:

      Tableau Raw Data.png


      What I'd like to be able to do is condense it down to the below:

      Tableau Condensed Data.png


      Here's some of the things I'm trying to find out, by user:

      1. When was the last time they had a record change? (B:B)
      2. What is their current disposition code? (Comes from the max [Record ID] for their User ID)
      3. What is their current Team? (Comes from the max [Record ID] for their User ID)
      4. What is their current Location? (Comes from the max [Record ID] for their User ID)
      5. When were they converted? (The [Date Entered] value of the first time they had a value >1 on their [Disposition Code]. If no value, null)


      I could write queries in MSSQL Server to create a condensed table, but I'd rather try to use the whole table if possible. I can see, in the future, that the business might require more visualizations based off of the transactional data.


      Any help/guidance you all could provide would be greatly appreciated.


      The Excel .xlsx is attached.