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.

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.

 Make System Type Size BMW CC 100 AUDI BB 200 TOYOTA CC 100 TOYOTA DD 300 BMW DD 300 AUDI AA 800 MERCEDES NN 100 OPEL WW 200 BMW EE 50 AUDI AA 800 TOYOTA EE 50 TOYOTA WW 200 BMW AA 800 AUDI BB 200 MERCEDES AA 800 OPEL WW 200

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

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:

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

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.

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:

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.