# Parent Level Calculations

### How are the metrics of parent bar calculated:

1. **Start Date** - Earliest start date of all its child bars
2. **End Date** - Latest end date of all its child bars
3. **Progress** - Refer to the below explanation:

Parent bar progress is the sum of its every child bar's product of duration and progress, divided by the sum of all its child bars duration:

<figure><img src="/files/tHoIn1uJuo6tkaLkCPwr" alt="" width="375"><figcaption><p><em>Image 1: Parent bat progress</em></p></figcaption></figure>

{% hint style="info" %}

* d is the duration of child bar
* p is the progress of the child bar
  {% endhint %}

Example:

<figure><img src="/files/piSLlrtNXR2RjViVjrzF" alt=""><figcaption><p><em>Image 2: Example</em></p></figcaption></figure>

4. **Data label (numeric) -** Select the aggregation in Number formatting -> Data\_label\_column\_name Aggregation Type option. It provides a dropdown to select the aggregation for numeric values in data labels.
   1. $$Sum= Σd$$
   2. $$Average= Σdl/n$$
   3. 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.$$Weighted Average = (Σ(d x dl))/Σ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.

{% hint style="info" %}
Read about: [Aggregation Type](/project-management/parent-level-calculations/aggregation-types.md)
{% endhint %}


---

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