Hi
I want to check the status immediately before through user define.
[Status].[Status].getMemberNameByKey(
[Issue].CurrentHierarchyMember.PrevMember.get(‘Status ID’)
) I expected to be able to check this way, but it doesn’t work. Is there any other way?
Function PrevMember can address the previous members within a hierarchy. Therefore, it will not work when you would like to address the previous Status value on the issue.
You would like to iterate through all historical statuses and compare the date of the last change to the last status updated date. Here is an example formula for this:
CASE WHEN
not IsEmpty([Issue].CurrentHierarchyMember.Get('Status updated at'))
THEN
Generate(Filter(
[Transition Status].[Transition Status].Members,
DateCompare(
([Measures].[Transition from status last date],
[Time].CurrentHierarchy.DefaultMember),
[Issue].CurrentHierarchyMember.GetDate('Status updated at')
) = 0
),
[Transition Status].CurrentMember.Name, ",")
END
Here Is my report example with the measures Previous Status and Issue Status.
Daina / support@eazybi.com
In addition to this, here is a useful formula to calculate the historical status before a specific number of days (in example: 5 days ago)
CASE WHEN
not IsEmpty([Issue].CurrentHierarchyMember.Get('Status updated at'))
THEN
Order(
Filter(
[Transition Status].[Transition Status].Members,
(
[Time].[Day].DateMember(DateAddDays([Time].[Day].CurrentDateMember.startdate,-5)),
[Measures].[Issues history]
)>0
),
[Measures].[Transition from status last date],
BDESC
).item(0).getCaption
END
Martins / eazyBI
The formatting is numeric, default … ?
@Marcelo_Ignacio_Cid1
try plain text or integer format
Martins
I am trying to obtain the status of a ticket per day (taking the time that the sprint lasted as the interval), that is:
If the sprint started on April 5, 2022 with 3 tickets, for each ticket show me that they were in backlog status.
Then if on April 6, 2022 only one was moved to the in progress status that shows me (by name of the tickets) 3 in the backlog and 1 in progress
April 05 → Ticket 1 → Backlog
Ticket 2 → Backlog
Ticket 3 → Bakclog
April 06 → Ticket 1 → Backlog
Ticket 2 → Backlog
Ticket 3 → In Progress
It seems like you have wrong format for the “dasdas” calculated measure.
Did you save the measure with “integer” format?
Martins
try plain text or integer format
Please reach out to support@eazyBI.com and provide your report definition.
Martins / eazyBI
Hello there!
Is it possible to add a condition to ignore all statuses that lasts less than a day? We have a lot of different statuses, and sometimes people just going through them, changing statuses each 5 seconds. So with your code i get previous status, but sometimes it is just one of these 5-seconds statuses, not the actual status were issue were for a week.
I understand that there should be a time in status restraint, but struggle with code.
Would greatly appreciate your help.
Thanks!
Hello Dmitry,
In this case, you would like to filter statuses only statuses longer than one day. Then you can order those filtered statuses by the last status transition time descendingly and get the first one.
Here is an example formula:
CASE WHEN
not IsEmpty([Issue].CurrentHierarchyMember.Get('Status updated at'))
THEN
NonEmptyString(Generate(Order(
Filter(
[Transition Status].[Transition Status].Members,
([Measures].[Days in transition status],
[Transition Status].CurrentMember) >= 1
), [Measures].[Transition from status last timestamp], BASC).item(0),
[Transition Status].CurrentMember.Name, ","))
END
Daina / support@eazybi.com