I have two different reports. In one of them, I have a scatter plot of tickets, x axis is dates, y axis is the number of hours it took for the ticket to get in “In Progress” for the first time. For this, I have a calculated measure with the following script:
DateDiffHours(
[Measures].[Issue created date],
([Measures].[Transition to status first date],
[Transition Status].[In Progress])
)
Works like a charm.
BUT: I have another report, where I want to aggregate all this data for each month and calculate a median from all the issues in that month. For this, I use the following script:
Median(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
NOT IsEmpty(
([Measures].[Transition to status first date],
[Transition Status].[In Progress])
)
),
DateDiffHours(
[Measures].[Issue created date],
([Measures].[Transition to status first date],
[Transition Status].[In Progress])
)
)
This is calculating the LAST time my issue got moved into in progress. So whenever a ticket goes to On Hold, Impeded or whatever, and then goas back to In Progress, my report uses that date instead of the very first one. How is this possible? I can’t see how an aggregation can mess up the same calculation. Unfortunately, I don’t know how to go deeper in debugging.
Thanks