# Time between to actions

**URL:** <https://community.eazybi.com/t/time-between-to-actions/540>\
**Category:** Questions & Answers\
**Tags:** javascript\
**Created:** [May 11, 2018, 11:48am UTC](https://community.eazybi.com/t/time-between-to-actions/540 "2018-05-11T11:48:36Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Valerii\_Sverdlik](https://community.eazybi.com/user_avatar/community.eazybi.com/valerii_sverdlik/32/1904_2.png) [@Valerii\_Sverdlik](https://community.eazybi.com/u/Valerii_Sverdlik)\
**Post date:** [May 27, 2020, 1:50pm UTC](https://community.eazybi.com/t/time-between-to-actions/540/8 "2020-05-27T13:50:32Z")

</div>

Hi Daina,

thank you for your reply. Seems like this post

> [@Calculating average time in transition for only the first time this transition is done](https://community.eazybi.com/t/calculating-average-time-in-transition-for-only-the-first-time-this-transition-is-done/2700/2):
>
> Hi @Philippe_Puy, Welcome to eazyBI community slight_smile In this case, the “average workdays” won’t fit your requirement as it would include all the transitions to particular status. You could try creating a new calculated measure using Descendants and measures “Transition to status first date” NonZero( Avg( Filter( Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]), ( [Measures].[Transitions from status], [Transition Status].[Open] )\>0 AND DateInPeriod( ( [Measures].[…

does what I need, but I a little bit lost in syntax. How can I modify the formula in order to:

1. Measure the last transition to 1 of 2 statuses: Closed or Done
2. Taking into consideration that in EazyBI setup status Awaiting Deployment is also treated as Closed state, but transition to this status only in this case is a part of development cycle
3. And of course apply only to the issue in Closed or Done status

---

_[View the full topic](https://community.eazybi.com/t/time-between-to-actions/540)._
