All eazyBI for Jira eazyBI for Confluence Private eazyBI

GetMemberByKey

EAZYBI Returns level member with a specified key value

Syntax

Dimension_Level_Expression.GetMemberByKey(key_value)

Arguments

key_value

String or numeric expression that returns a key value that should be used to lookup a member of the dimension level.

Examples

[Issue].[Issue].GetMemberByKey([Issue].CurrentHierarchyMember.get('Parent issue key')) returns a parent issue member for a sub-task issue. It is used in default Issue properties Issue sub-task keys and Issue open sub-task keys.


If this function is used in a tuple code, sequence of members is very important - getmemberbykey function that references to a dimension should be before the dimension itself. The formula below will switch Assignee user with Logged by user in the formula. It will find the Logged by user based on Assignee user, after the switch, the tuple will ignore the Assignee role for this user and will retrieve logged hours based on Logged by role for the user only.

(
  [Measures].[Hours spent],
  [Logged by].[User].GetMemberByKey(
    [Assignee].CurrentMember.Key
  ),
  [Assignee].DefaultMember
)

The next example will use both roles Logged by and Assignee for the user. The formula will pull in logged hours by the user only from currently assigned issues:

(
  [Measures].[Hours spent],
  [Logged by].[User].GetMemberByKey(
    [Assignee].CurrentMember.Key
  )
)

See example report Logged hours by user on assigned and unassigned issues in our demo account. The measures Hours spent on any issue and Hours spent on assigned issues uses the formulas above.

See also

There is a similar function GetLinkedMember.