# Two field pie chart

**URL:** <https://community.eazybi.com/t/two-field-pie-chart/20637>\
**Category:** Questions & Answers\
**Tags:** pie-chart\
**Created:** [February 5, 2026, 7:24pm UTC](https://community.eazybi.com/t/two-field-pie-chart/20637 "2026-02-05T19:24:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zane.baranovska](https://community.eazybi.com/user_avatar/community.eazybi.com/zane.baranovska/32/7209_2.png) [@zane.baranovska](https://community.eazybi.com/u/zane.baranovska)\
**Post date:** [February 9, 2026, 9:29am UTC](https://community.eazybi.com/t/two-field-pie-chart/20637/2 "2026-02-09T09:29:57Z")

</div>

Hi @CKirkland ,

There are two approaches you can take to make the pie chart.

**Option 1: Create two calculated measures**

In the Measures, create two separate calculated measures – one for counting early delivered issues and another for counting late issues. The calculation principle is to iterate over all issues and compare both dates for each. For the calculations, use the measure **“Issues with delivery date”** as the core element so you can filter the report using the **“Time”** dimension and get issues.

The expression for **Early delivered issues** issue count might look like below:

```mdx
Sum(
  --set of issues with target date and a delivery date
  Filter(
    Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
    NOT IsEmpty([Measures].[Issue target date])
    AND --delivery date falls in selected period
    DateInPeriod(
      [Measures].[Issue delivery date],
      [Time].CurrentHierarchyMember
    )
  ),
  --count early issues where target >= delivery
  CASE WHEN
    DateCompare(
      [Measures].[Issue target date],
      [Measures].[Issue delivery date]
    ) >= 0
  THEN --count issue and show on timeline by delivery date
    [Measures].[Issues with delivery date]
  END
)

```

Set measure **formatting** to **Integer**.

For the **Late delivered issues** , subtract the early delivery issue count (calculated measure you just created) from all Issues with a delivery date:

```mdx
[Measures].[Issues with delivery date] 
- [Measures].[Early delivered issues]

```

Select both calculated measures in the report columns. Set the Time dimension on rows or pages to get a report only for the issues with the Delivery date in the selected period.

More details on calculated measures are described in the documentation: [Calculated measures](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/calculated-measures).

**Option 2: Create a JavaScript Calculated Field**

If you have a large number of issues (the calculated measures are timing out) or need to use this categorization across multiple reports, consider creating a JavaScript calculated field ([Account specific calculated fields](https://docs.eazybi.com/eazybi/data-import/data-from-jira/javascript-calculated-custom-fields/account-specific-calculated-fields) ).

Create a new dimension “Delivered on time” to group all issues: early, late, nor delivered yet. See this community post on how to make such dimension: [https://community.eazybi.com/t/javascript-calculated-custom-field-dealing-with-two-dates/18975/2](https://community.eazybi.com/t/javascript-calculated-custom-field-dealing-with-two-dates/18975/2).

In the report, choose the measure “Issues with delivery date” on the columns and the new dimension on rows. Set the Time dimension on pages to generate a report for only the issues with the Delivery date in the selected period.

Best,  
Zane / [support@eazyBI.com](mailto:support@eazyBI.com)

---

_[View the full topic](https://community.eazybi.com/t/two-field-pie-chart/20637)._
