Question

I want to be able to create a calculated member which is the average of the monthly daily average. I have tried this using the adventureworks cube with the following MDX:

with Member Measures.DailyAverage AS

Avg ( EXISTING
    {[Date].[Date].[Date].Members},
    [Measures].[Internet Order Count]
    )


Member MonthlyAverageOfDailyAverage AS 
Avg ( EXISTING
    {[Date].[Month of Year].Members},
    Measures.DailyAverage
    )

select {(DailyAverage),(MonthlyAverageOfDailyAverage)} on columns,
[Date].[Calendar Year].Members on rows
from [Adventure Works]

This doesn't yield the answer I am expecting, Looking just at year 2005, July has 146 internet orders, 31 days with orders, therefore a daily average of 4.709, August has a daily average of 5.2, September = 5.379, October = 5.2, November = 5.2 and December = 5.032. I want the average of these daily averages which should be 5.120. The MDX above gives me 5.588. What should my calculated member be to get what I want? Thanks

Was it helpful?

Solution

Your mannual calculations are confirmed for July and August only

with Member Measures.DailyAverage AS

Avg ( EXISTING
    {[Date].[Date].[Date].Members},
    [Measures].[Internet Order Count]
    ), format_String="##.000000"

select (DailyAverage) on 0,
 [Date].[Calendar Year].&[2005] * [Date].[Calendar].[Month] on 1
from [Adventure Works]

enter image description here

Philip,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top