3 Replies Latest reply on Sep 27, 2018 6:28 AM by Ritesh Bisht

    Split field?

    Chris Chadwick

      I have a data source that has a single field recording questionnaire responses, the field categorises the responses from different groups of respondents (see table below);



      GroupQ1 ScoreQ2 ScoreQ3 Score
      Direct Reports566


      I wish to strip out the row 'Self' with all data into a separate column (Group 2) - see Table (below);


      Group 2GroupQ1 ScoreQ2 ScoreQ3 Score
      Direct Reports566


      is this possible with a Calculation Split or is it a Pivot?


      Treat me gently, I'm new to all this data cleansing stuff.





        • 1. Re: Split field?
          Jim Dehner

          Good morning


          Welcome to Tableau and the forum


          one way to do this is with a calculation that results in 2 "new groups"

                    if [Group] <>'Self' then 'New Group 2' else 'New Group 1' end



          you now have a hierarchy of the New Group and Group



          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          1 of 1 people found this helpful
          • 2. Re: Split field?
            meenu choudhary

            Hi Chris,


            You can try below approach:


            Create belwo calculated field:


            1. Group 2 =  if [Group]="Self" then [Group] END

            2.  Group new = if [Group]<>"Self" then [Group] END


            Arrange the values as shown below:


            1 of 1 people found this helpful
            • 3. Re: Split field?
              Ritesh Bisht

              Screen Shot 2018-09-27 at 6.53.08 PM.png




              Screen Shot 2018-09-27 at 6.57.38 PM.png



              Please follow above 2 steps and mark the answer as CORRECT



              1 of 1 people found this helpful