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:
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:
[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.
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 ).
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.
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