Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calculated Members - Crossjoin?

14 views
Skip to first unread message

ne...@willowvale-nairn.co.uk

unread,
Aug 2, 2012, 8:02:45 AM8/2/12
to
I am adding a calculated member to a cube where I want to aggregate differences between measures from a number of last periods against a measure for the current period:

Simplified I am using this:

SCOPE ([Measures].[Fact3]);
THIS =
Aggregate( LastPeriods(3,[Period].CurrentMember),
([Measures].[Fact1]-([Period].CurrentMember,[Measures].[Fact2]))
);

END SCOPE;

But this returns:

(Period1 Fact1 - Period1 Fact2) + (Period2 Fact1 - Period2 Fact2) + (Period3 Fact1 - Period3 Fact2)

But I want:

(Period1 Fact1 - Period3 Fact2) + (Period2 Fact1 - Period3 Fact2) + (Period3 Fact1 - Period3 Fact2)

Any help appreciated.

Thanks

ne...@willowvale-nairn.co.uk

unread,
Aug 2, 2012, 8:12:38 AM8/2/12
to
Just to add that I will be extending this to aggregate the Squares/cubes of the differences and other calulcation so it is not just a case of reordering the simple math to Sum(last periods, Fact1) - 3*(CurrentMember,Fact2)

Thanks
0 new messages