# 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.

<figure><img src="/files/41fLGyZhxTNE0Jp05cfz" alt=""><figcaption><p><em>GIF 1: Configuration of the Aggregation types</em></p></figcaption></figure>

**Steps to configure the aggregation type:**

1. 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.

2. In the format pane, turn on the toggle for the “Planned Duration” option from the display measure.

{% hint style="warning" %}
The option name depends on the name of the measure. In this example, “Planned Duration” is the measure.
{% endhint %}

![Image 2: Configuration of Display Measure Data Field](/files/hbCGdvCsJrGj1HVPa4GT)

3. 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:**

![Image 3: Sum Aggregation Type](/files/40CGm5a7dEK7AzK7NKWs)

![Image 4: Sum Aggregation on xViz Gantt Chart](/files/qIfY4eXNiQXJfFlAJwwz)

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:**

![Image 5: Average Aggregation Type](/files/NbR4KUV41eYQhNB8iNfO)

![Image 6: Average Aggregation on xViz Gantt Chart](/files/IhKTkHxrrC35IkqdYCrb)

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:**

![Image 7: Weighted Average Aggregation Type](/files/vFT4Uo4xZKJG4gvRRMz2)

![Image 8: Weighted Average Aggregation on xViz Gantt Chart](/files/WpFvKCaOwTwWaodfoGD3)

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**](https://xviz.com/visuals/gantt-chart/) (Microsoft certified) for Power BI from Microsoft AppSource [**here**](https://appsource.microsoft.com/en-sg/product/power-bi-visuals/WA200000891?tab=Overview)**.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xviz.com/project-management/parent-level-calculations/aggregation-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
