Knut Ivar
2007-01-16 10:19:00 UTC
Hi,
(sorry but I didn't finde a way to write my MDX-example against the
Adventure Works DW cube.)
I need to made an calculated member in my cube where I could see the top 10
% Feeding Costs (grouped by FeedingID level). So it should be used as an
benchmark.
This 'KrPrFeedingTop10pct_Avg' works fine for the same month. But I also
need this kinde of benchmark value for the last 12 months. If I brows the
value for the 12Month benchmark in May 2005 it should
show the average value for the top 10% Feeding in the last 12 months .
June 2004 - May 2005. But I don't finde a way to made this calculation.
Think I may should use an decendante() command. But I am not sure how to
write it.
this work fine:
CREATE MEMBER CURRENTCUBE.[MEASURES].KrPrFeedingTop10pct_Avg
AS
avg(toppercent([Feedings].[Feeding].[FeedingID].members,10,[Measures].[KrPrFeeding]),[Measures].[KrPrFeeding]),
VISIBLE = 1;
THis work fine to finde the last 12 months amount of feeding in the region.
CREATE MEMBER CURRENTCUBE.[MEASURES].RegionFeedingLast12Months
AS sum(LastPeriods (12,
Ancestor([Dates].[PeriodMonth].currentmember,[Dates].[PeriodMonth].[Period
Month])) ,[Measures].[RegionFeedingPeriod]),
VISIBLE = 1;
I need to made a new calculated member where I could use some kind of
combination if this two principals. To find the last 12 Months top 10% avg
for Feeding TotalBeop But I think I may is a hard one.
Thanks to any suggestions.
Knut Ivar
(sorry but I didn't finde a way to write my MDX-example against the
Adventure Works DW cube.)
I need to made an calculated member in my cube where I could see the top 10
% Feeding Costs (grouped by FeedingID level). So it should be used as an
benchmark.
This 'KrPrFeedingTop10pct_Avg' works fine for the same month. But I also
need this kinde of benchmark value for the last 12 months. If I brows the
value for the 12Month benchmark in May 2005 it should
show the average value for the top 10% Feeding in the last 12 months .
June 2004 - May 2005. But I don't finde a way to made this calculation.
Think I may should use an decendante() command. But I am not sure how to
write it.
this work fine:
CREATE MEMBER CURRENTCUBE.[MEASURES].KrPrFeedingTop10pct_Avg
AS
avg(toppercent([Feedings].[Feeding].[FeedingID].members,10,[Measures].[KrPrFeeding]),[Measures].[KrPrFeeding]),
VISIBLE = 1;
THis work fine to finde the last 12 months amount of feeding in the region.
CREATE MEMBER CURRENTCUBE.[MEASURES].RegionFeedingLast12Months
AS sum(LastPeriods (12,
Ancestor([Dates].[PeriodMonth].currentmember,[Dates].[PeriodMonth].[Period
Month])) ,[Measures].[RegionFeedingPeriod]),
VISIBLE = 1;
I need to made a new calculated member where I could use some kind of
combination if this two principals. To find the last 12 Months top 10% avg
for Feeding TotalBeop But I think I may is a hard one.
Thanks to any suggestions.
Knut Ivar