# Aggregation Types

In the xViz Gantt Chart, there are multiple aggregation types available.

For any measures inserted in the “Display Measures” data field, the aggregation is done at the parent level.

The aggregation is done at the parent level based on the child level durations and the data label value.

**Steps to configure the aggregation type:**

Add the measure of your needs in the “Display Measures” data field.

In the above example, Planned Duration has been added in the data field.

In the format pane, turn on the toggle for the “Planned Duration” option from the display measure. Note: The option name depends on the name of the measure. In this example, “Planned Duration” is the measure.

In the format pane, go to “Number Formatting” section and select the aggregation type as per the requirement. These are the available aggregation types - Sum, Average, Weighted Average.

**Sum Aggregation type:**

**Sum Aggregation type:**

You can see that the Planned Duration at the Parent level has been aggregated as an arithmetic sum.

Measure value at parent:

Sum=Σd

Where d is the measure value of the child bar.

Consider the “REQUIREMENTS” parent in the above example: The duration is the sum of Planned Duration of all the child levels (0 + 7 + 6 + 2 = 15).

**Average aggregation Type:**

**Average aggregation Type:**

You can see that the Planned Duration at the Parent level has been aggregated as an arithmetic mean (Average).

Measure value at parent Average=Σdl/n

where dl is the data label value of the child bar, n is the number of child bar.

Consider the “DEVELOPMENT” parent in the above example – The Duration is the average of Planned Duration on all the child levels (0+19+7+6)/4=8

**Weighted Average Aggregation Type:**

**Weighted Average Aggregation Type:**

You can see that the Planned Duration at the Parent level has been aggregated as weighted average.

Parent bar data label of weighted average type is the sum of its every child bar's product of duration and data label value, divided by the sum of all its child bars duration.

Measure value at parent Weighted Average=(Σ(dxdl))/Σd

Where n is number of child bars, d is the duration of child bar, dl is the data label value of the child bar.

Consider the “REQUIREMENTS” parent in the above example, Parent bar data label of weighted average type is the sum of its every child bar's product of duration and data label value, divided by the sum of all its child bars duration.

((8x7) +(4x6) +(2x2))/ (8+4+2) = (56+24+4)/14= (86/14) =6

**Weighted average = 6**

Try the **xViz Gantt Chart** (Microsoft certified) for Power BI from Microsoft AppSource **here****.**

Last updated