Including workdays in current status

Hi!

I have this formula:

([Measures].[Workdays in transition status],
    [Transition Status.Category].[Listo]) + 
    
([Measures].[Workdays in transition status],
[Transition Status.Category].[En curso])

but, I need the time still now in transition status. I used this formula, but I dont work.

-- days in transition status when issue was in this status in previous times
IIF(
  -- if report uses Status dimension instead of Transition status it should work as well:
  [Status].CurrentHierarchyMember.Level.Name = "Status" and Not [Transition Status].CurrentHierarchyMember.Level.name = "Transition status",
    ([Measures].[Days in transition status],
     [Transition Status].[Transition status].GetMemberByKey(
        [Status].CurrentHierarchyMember.Key
    )), 
    [Measures].[Days in transition status])
+
-- days since last transition to this status
NonZero(SUM(Filter(
  Descendants([Issue].CurrentMember, [Issue].[Issue]),
  -- for unresovled issues only
  IsEmpty([Issue].CurrentHierarchyMember.Get("Resolved at"))
  AND
  IIF([Transition status].CurrentHierarchyMember.Level.Name = "Transition status",
      [Transition status].CurrentHierarchyMember.Name = [Measures].[Issue status], 1)
  AND
  IIF([Status].CurrentHierarchyMember.Level.Name = "Status",
    [Status].CurrentHierarchyMember.Name = [Measures].[Issue status], 1)
  ),
  CASE WHEN
  [Measures].[Issues history] > 0
  THEN
  DateDiffDays(
    [Measures].[Issue status updated date],
    Now()
  )
  END
))

image

Thks!!

Hi,

The formula could be simplified in some cases, depending on the report context.
The main impact on the performance is from the line that refers to Issues history:

[Measures].[Issues history] > 0

In some cases this line can be replaced with a more efficient:

  [Measures].[Transitions to status] >0

Report details would help.

Kindly,
Janis, eazyBI

Hi @janis.plume !!

Hi,

In my report is show the quantity of workdays in transition status for dimension “Iniciativa” in status category In Progress and Ready.
This data the generate with this formula:

([Measures].[Workdays in transition status],
    [Transition Status.Category].[Listo]) + 
    
([Measures].[Workdays in transition status],
[Transition Status.Category].[En curso])

But, right now need considerer the workdays in status till now in that generate the report.

We change the line recomended but not has luck! :pensive:

The dimensions used by report:

Pages: Flagged - Time - Issue Type
Rows: Iniciativa
Columns: Project - Measures

Thanks! for your help :grinning:

Please send the report definition to our support email
We will probably have further questions about the use case behind this report, but the options for optimization still looks rather promising.

Kindly,
Janis, eazyBI support

1 Like