I am trying to calculate SLA Status but some of them shows wrong

I have 4 statuses, and I measure the time spent until an issue passes through each status. If the issue is still in that status, I measure the time it has remained there. Each status has its own SLA time — for example, status X has 1 business day while status Y has 3 business days.

I also have a field called product choice, and one of the statuses SLA is determined based on that. For instance, if product A is selected, the SLA is 1 business day; if product B is selected, the SLA is 3 business days.

I can calculate and display these values on the screen. If none of the 4 statuses have breached their SLA, it should show Met; if even one has breached, it should show Breached; and if the issue has not yet entered any of the statuses, it should show Not measured yet. But it’s currently showing wrong data.

This is my current formula :

"SLA Breached",

IIF(
  -- 4.1–4.4 threshold kontrolleri
  (
    CoalesceEmpty((
      [Measures].[Days in transition status],
      [Transition Status].[4.1 Fizibilitenin hazırlanması],
      [Time].CurrentHierarchy.DefaultMember
    ),0) +
    CASE WHEN [Measures].[Issue status] = '4.1 Fizibilitenin hazırlanması'
      THEN DateDiffDays([Measures].[Issue status updated date], Now())
      ELSE 0 END
  ) >= 3
  OR (
    CoalesceEmpty((
      [Measures].[Days in transition status],
      [Transition Status].[4.2 Fizibilite onayı],
      [Time].CurrentHierarchy.DefaultMember
    ),0) +
    CASE WHEN [Measures].[Issue status] = '4.2 Fizibilite onayı'
      THEN DateDiffDays([Measures].[Issue status updated date], Now())
      ELSE 0 END
  ) >= 3
  OR (
    CoalesceEmpty((
      [Measures].[Days in transition status],
      [Transition Status].[4.3 Teklifin hazırlanması],
      [Time].CurrentHierarchy.DefaultMember
    ),0) +
    CASE WHEN [Measures].[Issue status] = '4.3 Teklifin hazırlanması'
      THEN DateDiffDays([Measures].[Issue status updated date], Now())
      ELSE 0 END
  ) >= 2
  OR (
    CoalesceEmpty((
      [Measures].[Days in transition status],
      [Transition Status].[4.4 BT Teklif onayı],
      [Time].CurrentHierarchy.DefaultMember
    ),0) +
    CASE WHEN [Measures].[Issue status] = '4.4 BT Teklif onayı'
      THEN DateDiffDays([Measures].[Issue status updated date], Now())
      ELSE 0 END
  ) >= 1,

  "SLA Breached",
  "SLA Met"
)

)
)

Hi @iclalaslan ,

The calculation considers the issue properties “Issue status” and “Issue status updated date”. These return a value only when individual issues are in the report. Does your report have Issue dimension “Issue” level members in the report?

If not, please share more details about the report, for example, the report definition and what are the expected results with that configuration.

Best,
Roberts // support@eazybi.com