Get attribute value from Object type attribute with multiple values

Use case:
Insight registry wirh 2 object types:

  • Desktop (contains 1 object: Desktop 1)
  • Display (containts 2 objects: Display 1 and Display 2)

Both, Display 1 and Display 2 have integer type attribute “Size” and one has value 24 other 50.
Desktop has Object type attribute “Display”, can have unlimited amount of values.

In isight I created Calculated measure “Size”:
[Object].CurrentHierarchyMember.GetLinkedMember(‘Desktop Displays’, [Object].[Object]).get(‘Display Size’)

Works fine with only one Display assigned to Desktop.

But when one Desktop has more than one display assigned, it shows them under Desktop as rows, but “Size” comes as empty!

How to I get report working with multiple values assigned and to get every attribute value from those objects?

Used this article to get this working with one Display assigned and modified this mdx a bit:

Get atribute value from a reference object

The function GetLinkedMember works well when you need to switch to another object. But it can’t switch to several other objects. You would like to use the function GetLinkedMembers instead.

The function getLinkedMembers will access a set of linked objects. Then you would like to apply some additional configurations to them:

  1. Show details per each object as a string:
NonEmptyString(Generate(
[Object].GetLinkedMembers('Desktop Displays'),
[Object].CurrentMember.Name || " - " || 
[Object].CurrentMember.GetString('Display Size') 
, chr(10)
))
  1. Sum some numeric value from those objects.
NonZero(Sum(
[Object].GetLinkedMembers('Desktop Displays'),
[Object].CurrentMember.GetNumber('Display Size') 
))

Here is my example for this. For each person, I have several competencies assigned. And each competence has some course costs. I represented the costs by course and the total sum of course costs.

Daina / support@eazybi.com

1 Like

Thank you Daina very much. This was exactly what we needed to resolve our issue. Now we can visualize object attributes and connected object attributes in same row to create combined reports.