Hello All,
I have some problems developing a function in order to obtain
information I need from my cube. Does anybody know how to code a
function that would do the following:
Retrieve the member of a given dimension that responds to a certain
boolean criteria, and is the direct child of the first common parent
in a certain hierarchy of the current member and another member in
this dimension given as parameter.
For instance, let's imagine this virtual function with the following
parameters :
GetMemberByCriteria(MemberParameter, Dimension, Hierarchy, Criteria)
LEt's take a dimension named "Geography" with only one Hierarchy (H1)
that represents the countries of the world in the following form:
"World" -> "Continent" -> "Nations Organisation" -> "Country"
The criteria property named "contact" means "is the contact country
for this branch/level of the hierarchy?" (contains Y or N for each
country).
We have : GetMemberByCriteria(France, Geography, H1, contact)
- if the currentmember is Spain, the result is Belgium (contact
country for the Organization "European Community")
- if the CurrentMember is Russia, the result is Switzerland (Contact
country for Continent "Europe")
- if the CurrentMember is Australia, the result is USA (Contact
country for "World")
- if there is no commom parent (for some unexplainable reason, we
return "" or Null...
I have been working on this for my company for a while and can't get
around to find the solution. If you have any suggestions as to what
code I might use for such a function, I'd be most happy to hear from
you
Thanks in advance for reading so far, and even more if you can help me
out !
Miguel