2 Replies Latest reply on Dec 5, 2016 6:58 AM by Dim Pl

    Group data according to one attribute and treat the group as a single unit.

    Dim Pl

      Hello,

       

      I got a problem regarding my data set and I would pretty much appreciate your help. Consider the following table of data where "System Type" field describes an automobile system.

      Unfortunately system types CC,DD,EE are parts of the same system and therefore i need to group them. The problem comes when i need to present the data set as "Make" and "Number of records" because in essence i need to group CC,DD and EE system types and divide them by 3 so the overall number of systems is correct.

       

      MakeSystem TypeSize
      BMWCC100
      AUDIBB200
      TOYOTACC100
      TOYOTADD300
      BMWDD300
      AUDIAA800
      MERCEDESNN100
      OPELWW200
      BMWEE50
      AUDIAA800
      TOYOTAEE50
      TOYOTAWW200
      BMWAA800
      AUDIBB200
      MERCEDESAA800
      OPELWW200

       

       

      Thanks in advance.

        • 1. Re: Group data according to one attribute and treat the group as a single unit.
          Jonathan Drummey

          See the attached. I used two calculated fields:

           

          System Type Divisor has the formula:

          IF [System Type] = 'CC' OR [System Type] = 'DD'

              OR [System Type] = 'EE' THEN 3 ELSE 1 END

           

          Adjusted Size has the formula:

          ZN([Size])/[System Type Divisor]

           

          Then in the view this is aggregated to the viz level of detail (vizLOD) which is based on the dimensions in the view. In a view with Make and System Type we get to see the details:

           

          Screen Shot 2016-12-05 at 9.09.50 AM.png

           

          Then in a view with just make we get an accurate number total of Adjusted Size:

           

          Screen Shot 2016-12-05 at 9.10.45 AM.png

           

          Tableau v9.3 workbook is attached. Let me know if you have any questions!

           

          Jonathan

          • 2. Re: Group data according to one attribute and treat the group as a single unit.
            Dim Pl

            Hello again,

             

            Unfortunately this answer cannot reflect the desired information. For instance in the number of records column CC, DD and EE are recorded separately instead of once as a group. My problem is not the total size (at least for the moment) but the numbers of records of the systems. My data set is huge with a variety of attributes on each line and I have to apply multiple filters to a "clean" visualisation. What I made was a simple grouping of data as follows:

             

            Screen Shot 2016-12-05 at 15.48.17.png

            but I would like the number of records of the "Group" lines to be 1 instead of 3.

            I will attach a workbook with updated calculated fileds.

             

            Thanks again.