# SLA count for tickets created in date range

**URL:** <https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817>\
**Category:** Questions & Answers\
**Tags:** sla\
**Created:** [October 25, 2022, 4:52pm UTC](https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817 "2022-10-25T16:52:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexN](https://community.eazybi.com/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@AlexN](https://community.eazybi.com/u/AlexN)\
**Post date:** [October 25, 2022, 4:52pm UTC](https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817/1 "2022-10-25T16:52:15Z")

</div>

Hi guys,

Please help to create measures to use for SLAs:  
time to resolution (Met/Breached/%)  
time of first reaction (Met/Breached/%)

Only for tickets created in/from a certain time frame.

Thanks.

---

<div class="post-metadata">

**Author:** ![AlexN](https://community.eazybi.com/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@AlexN](https://community.eazybi.com/u/AlexN)\
**Post date:** [October 31, 2022, 4:32pm UTC](https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817/2 "2022-10-31T16:32:07Z")

</div>

Hi guys, any help here?

---

<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:** [November 2, 2022, 8:33am UTC](https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817/3 "2022-11-02T08:33:20Z")

</div>

Hi @AlexN,

Usually, the SLA is measured by the period when the cycle ends to ensure the past data are not changing for completed cycles. Descritpion on Service Management metrics available in the documentation:

If you would like to change this logic to issue a creation date, you can create c **alculated measures**. The calculation would iterate through individual issues and check their creation date, then sum up the resolution time, ignoring when the cycle was completed.

The expression might look like this:

```auto
Sum(
  --set of issues, filter issues created in the selected period
  Filter(
    DescendantsSet([Issue].CurrentMember, [Issue].[Issue]),
    DateInPeriod(
      [Issue].CurrentMember.Get('Created at'),
      [Time].CurrentHierarchyMember)
  ),
  --SLA ignoring the period when the cycle was completed
  ([Measures].[Time to resolution - Met], 
  [Time].CurrentHierarchy.DefaultMember)
)

```

You can use similar calculations for other SLA metrics. If you would like to get an averaged SLA value, then use the function **Avg()** instead of **Sum()**. More details in calculated measures and aggregate calculations are described in the documentation: [Calculated measures](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/calculated-measures#Calculatedmeasures-Aggregatemeasures)

Check out also those two Community posts on SLA calculations by issue creation date:

> [@SLA dashboard filtering by created date](https://community.eazybi.com/t/sla-dashboard-filtering-by-created-date/6117/2):
>
> Hi @Cefo, I just found that your question has gone unanswered for some time. Sorry about that! The SLA measures are grouped by the SLA cycle completed date. You can create a new calculation that sums them by the Issue creation date. Please try the following for Time from creation to resolved - Met (give it a different name, e.g., Time from creation to resolved - Met by created date) Sum( Filter( Descendants([Issue].CurrentMember, [Issue].[Issue]), [Measures].[Issues created] \> 0 ), …

> [@How to exclude issues created after a certain date from SLA "Time to resolution" calculation for a single client](https://community.eazybi.com/t/how-to-exclude-issues-created-after-a-certain-date-from-sla-time-to-resolution-calculation-for-a-single-client/2881):
>
> Hello Community, EazyBI imports data from jira service desk. We are using a graphe with following predefined measures to follow-up on SLAs for most of our clients =\> Time to resolution - Met Time to resolution - Breached Time to resolution - Met % One of our clients has a particularity : issues taken into account should have a “created date” \>= a certain date (say 2019-05-01). We would like to have the exact same graphe (so the time to resolution SLA measures) for that client (one graph…

Best,  
Zane / support @eazybi.com

---

<div class="post-metadata">

**Author:** ![AlexN](https://community.eazybi.com/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@AlexN](https://community.eazybi.com/u/AlexN)\
**Post date:** [November 16, 2022, 3:20pm UTC](https://community.eazybi.com/t/sla-count-for-tickets-created-in-date-range/10817/4 "2022-11-16T15:20:49Z")

</div>

Hi @zane.baranovska.

Thank you very much for the tip and code.  
This is what we need.

Cheers
