Add a condition on the reporter list which depends of the creation date of the issue

Hello guys,

I am trying to follow the number of issues with a given status over time. But there is a twist : if the issue was created after october 13, I want to count it only if the reporter is in a list I have. And if the issue was created before october 13, I want to count it only if the issue has a reporter in another list I have.
I already aggregated the lists I have in the reporter dimension (I called them ListA and ListB), and I tried to put Time in rows and Measures in columns, with the calculated measure :

([Measures].[Issues history],
[Issue Type].[User Story],
[Resolution].[Done],
[Reporter].[ListA]
)

But if the creation date of the issue is after october 13, I need to change ListA into ListB but I do not know how to do it.

Thanks a lot everyone :slight_smile:

Hi @Paul2,

Welcome to the eazyBI community! :partying_face:

Because you analyze the issue history, the calculation needs to look at each issue individually. That can add additional strain to the report execution. It seems you want to consider the resolved issues. In that case, the calculation could look similar to the one below:

Sum(
  Filter(
    Descendants([Issue].CurrentMember,[Issue].[Issue]),
    -- resolved issues
    Not IsEmpty([Issue].CurrentMember.Get('Resolved at'))
  ),
  CASE WHEN
  DateCompare(
    [Issue].CurrentMember.Get('Created at'),
    'Oct 13 2022'
  ) < 0
  THEN
  -- issue created before Oct 13 2022
  NonZero((
    [Measures].[Issues history],
    [Issue Type].[User Story],
    [Resolution].[Done],
    [Reporter].[ListA]
  ))
  ELSE
  -- issue created on or after Oct 13 2022
  NonZero((
    [Measures].[Issues history],
    [Issue Type].[User Story],
    [Resolution].[Done],
    [Reporter].[ListB]
  ))
  END
)

If your eazyBI account has many issues and the calculation times out, I recommend exploring JavaScript calculated custom fields. You could define a new field that would mark issues created before Oct 13 2022, and after differently. You could import the field as a dimension and use it as a marker in a tuple similar to the one you already defined. Please look at our documentation page for more information on JavaScript calculated custom fields - JavaScript calculated custom fields.

Best,
Roberts // support@eazybi.com