Portfolio dimension / get key from issue

Hello,
I have a problem that I simply cannot solve.
We have a hierarchy using portfolio parent links: request> epic > story
“Requests” are in a special jira-project (REQ), the underlying issues (and hours logged) are in different jira projects (one per team). A typical scenario is: build a report that shows the information of the REQ-issue that can be filtered via pages but show the aggregated hours and estimated from the various issues and different teams/jira projects.

Usually to get the amount of hours spent per “request” and team I simply use the built-in portfolio dimensions which works great. However using this dimension I cannot use the pages-filters anymore because for example the “status” of the main REQ-issue is different than the status of the issues further down the hierarchy, but the pages-filter is applied to all issues, not just the main ones.

My idea is to use the issue-dimension and then have a calculated measure with a tuple that looks up the current issue key in the portfolio dimension returning that number using “getMemberbyKey”.

Now if create a static tuple for one “request” it seems to be working fine, the hours are correct:

(
[Portfolio Request].[REQ-123],
[Issue].DefaultMember,
[Measures].[Hours spent]
)

However I simply cannot get the GetMemberbykey working:

(
[Portfolio Request].GetMemberByKey(
[Issue].CurrentMember.Key
),
[Issue].DefaultMember,
[Measures].[Hours spent]
)

is just throwing me an error:

#ERR: mondrian.olap.fun.MondrianEvaluationException: Expected value of type MEMBER; got value 'mondrian.olap.fun.MondrianEvaluationException: Exception while executing function getMemberByKey: java.lang.ClassCastException ’ (class mondrian.olap.fun.MondrianEvaluationException)

even though

[Issue].CurrentMember.Key

is showing me the key of the issue of the line in question.

I spent hours looking for an answer on your forums but every time I try to adapt a solution it’s not working. I would very much appreciate your help and advice. Apologies if the answer has already been given elsewhere.

Thank you and best regards :slightly_smiling_face:
Max

Any help would be appreciated :slight_smile: