Age measure with or condition

Hi Team,

Is there any Measure to calculate the age based on below condition.

If issue having Closed Date then Closed Date – Issue Created Date, if Closed Date is not there then Issue Resolved Date – Issue Created Date, if both are not there then Now()-Issue Created Date.

This is the condition we required, can you please help me on the Measure with this i can use one age measure for all status analysis.

Regards
Kasi

Hi @kasi.maddula

For issue-level report, you could try creating a calculated measure that returns results from issue properties for the “Issue” dimension.

Try this formula for calculated measure:

CASE WHEN
[Issue].CurrentHierarchyMember.level.name = "Issue"
THEN
  CASE WHEN
  IsEmpty(
    [Measures].[Issue closed date]
  )
  AND
  IsEmpty(
    [Measures].[Issue resolution date]
  )
  THEN
  DateDiffDays(
[Measures].[Issue created date],
    Now()
  )
  WHEN  
    IsEmpty(
    [Measures].[Issue closed date]
  )
  AND
  Not IsEmpty(
    [Measures].[Issue resolution date]
  )
  THEN
  DateDiffDays(
  [Measures].[Issue created date],
  [Measures].[Issue resolution date]
  )
  WHEN
  Not IsEmpty(
    [Measures].[Issue closed date]
  )
  THEN
  DateDiffDays(
  [Measures].[Issue created date],
  [Measures].[Issue closed date]
  )
  END
END

Martins / eazyBI