# Storing days In Progress in Calculated formula member

In my report I use the predefined measure: Days in transition status.
In the output this gives me number of days an issue was in status" In Progress".
I want to use this value in a calculated measure. How do I do that?
I have tried to store this value in a calculated measure, but I have been unsuccessful.

Second question:
The value above counts all days in this status.
In some cases, an issue returns to a previous state, eg. Submitted. And then after a while it will be transitioned to In Progress again.
Suppose I only want to count the number of days since the last time it went into In Progress. How could I do that?

Welcome to the eazyBI community!

To create a calculated measure with Transition Status â€śIn Progressâ€ť and measure â€śDays in transition statusâ€ť, I recommend using Tuple function (learn more about this function here https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/tuple) . You could try the formula below

``````(
[Measures].[Days in transition status],
[Transition Status].[In Progress]
)
``````

To count the time spent in status â€śIn Progressâ€ť but only the last time the issue entered â€śIn Progressâ€ť status, I recommend defining a new calculated measure with formula below using â€śDateDiffDaysâ€ť (DateDiffDays) function and again the Tuple function with the measures â€śTransition to/from status last timestampâ€ť

``````DateDiffDays(
TimestampToDate(([Measures].[Transition to status last timestamp],
[Transition Status].[In Progress])),
TimestampToDate(([Measures].[Transition from status last timestamp],
[Transition Status].[In Progress]))
)
``````

Best wishes,

Elita from support@eazybi.com

I had no idea it would be so simple. Thank you very much.

1 Like