For navigating to the parent Incentive Rate, I'm using an idea from an
earlier post by Chris Webb - hopefully, it will work in your case:
Quote:
|
With Member [Measures].[Parent Rate] as
|
'(Filter(NonEmptyCrossJoin(
{[Measures].[Incentive Rate]},
{Ancestor([Time].CurrentMember, [Time].[Year])},
Ascendants([Customer].CurrentMember),
Ascendants([Customer].CurrentMember)),
NOT([Customer].CurrentMember is
[Customer].CurrentMember.DataMember OR
[Product].CurrentMember is
[Product].CurrentMember.DataMember)).Item(0))'
Then [Parent Rate] is used when aggregating [Incentive Amount] from leaf
level [Net Turnover] data:
Quote:
|
Member [Measures].[Incentive Amount] as
|
'Sum(NonEmptyCrossJoin({[Measures].[Net Turnover]},
Descendants([Time].CurrentMember,,LEAVES),
Descendants([Customer].CurrentMember,,LEAVES),
Descendants([Product].CurrentMember,,LEAVES)),
[Measures].[Net Turnover] * [Measures].[Parent Rate])'
There may be some way to optimize the aggregation without going to leaf
level, but it gets complex already.
Here's the post on how to find "Members with Data":
http://groups-beta.google.com/group/...rver.olap/msg/
0ee6852b05fec13d?dmode=source
Well, working with the knowledge that if you use the .DATAMEMBER
function on
a leaf member or a member without a datamember it will return the member
itself, you can construct a query like this:
SELECT MEASURES.MEMBERS ON 0,
NON EMPTY
GENERATE(
FILTER(EMPLOYEES.MEMBERS,
NOT(EMPLOYEES.CURRENTMEMBER IS EMPLOYEES.CURRENTMEMBER.DATAMEMBER))
, {EMPLOYEES.CURRENTMEMBER.DATAMEMBER})
ON 1
FROM HR
...
- Deepak
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!