Count every issue using a filter on currentmember.key

Hi,

I am looking to count all issues that match with the current issue key.
This syntaxe is working

[Measures].[Issue OutwardLink Epic X ← implements Y] = “DUSWSWITCHPORT-59”*/
This isn’but [Issue].CurrentMember.key give me “DUSWSWITCHPORT-59”
[Measures].[Issue OutwardLink Epic X ← implements Y] = Str([Issue].CurrentMember.key)

full measure under.
Count(

Filter(
– Set définie sur les FEAT/EF
Filter([Issue].[Issue].Members,

  [Measures].[Issue type] = "Feature" Or [Measures].[Issue type] = "Enabler Feature"

/*[Measures].[Issue InwardLink depend on > Epic Y]

[issue].CurrentMember.key*/
)
,
– Condition sur la clé de l’EPIC
/* fonctionne en mettant la clé directement
[Measures].[Issue OutwardLink Epic X ← implements Y] = “DUSWSWITCHPORT-59”*/
[Measures].[Issue OutwardLink Epic X ← implements Y] = Str([Issue].CurrentMember.key)
)
)

i got this error : #ERR: mondrian.olap.fun.MondrianEvaluationException: mondrian.olap.InvalidArgumentException: Mondrian Error:Invalid parameter. number parameter DUSWSWITCHDO-1 of Str function must be of type number

Hi @XavierH,

Since you have imported the link dimensions, it might be better to create the calculated member “Epic / Enabler EPIC SAFe” in the issue link dimension.

The expression might be as follows.

Aggregate(
 Filter(
--set of links
    [InwardLink depend on > Epic Y].[InwardLink depend on > Epic Y].Members,
--filter conditions on issue type
 ([Issue Type].[Issue Type].getMemberNameByKey(
      [Issue].GetMemberByKey([InwardLink depend on > Epic Y].CurrentMember.Key).get('Issue type ID')) = 'Epic'
 OR
  [Issue Type].[Issue Type].getMemberNameByKey(
      [Issue].GetMemberByKey([InwardLink depend on > Epic Y].CurrentMember.Key).get('Issue type ID')) = 'Enabler EPIC SAFe')
 )
)

In that case, you might create the calculated measure “number of N2 link to a specifique EPIC” with the following expression.

Count(
 Filter(
  [Issue].[Issue].Members,
--condition 1
 [Measures].[Issue type] = "topic"
AND
--condition 2
[Measures].[Issue InwardLink depend on > Epic Y] = CAST([InwardLink depend on > Epic Y].CurrentHierarchyMember.Key AS STRING) 
))

If the same Epics appear in both dimensions, you might create the “Number of Feature link to Epic / Enabler EPIC SAFe” with a reference to the “InwardLink depend on > Epic Y” in the same report. Otherwise, you would need to create the calculated member “Epic / Enabler EPIC SAFe” within the dimension “Issue OutwardLink Epic X ← implements Y”.

Regards,
Oskars / support@eazyBI.com