### Similar Threads:

1.Help with Calculating Average in Cube

I'm new at OLAP. There is a cube already deisgned with following time/
date dimensions.
[Date] Dimension:
*Year
**Quarter
***Month
****Date
[Time] Dimesion:
*Hour
there is a measure which counts total number calls [Calls].
What I need to do is that depending what date that user chooses(could
be multiple days or single month),
calculate average calls for each hour.
What is the best way to achieve this goal?
Or since I have already had total number of calls working, is it
possible to create a measeure which gets number of days from [Date]
Dimension?
Thanks in advance

2.Help with Calculating Moving Average in Cube

Sorry if this is a simple question, but I'm very new at OLAP.
In SQL 2005 I am trying to calculate a 12-month moving average for a measure
in my cube and I'm having a little trouble. The average seems to reset
itself as it crosses boundaries in the time hierarchy.
I'm using the following calculation in the cube to get my 12-month rolling
average:
Avg ([Time].[CalendarMonth].CurrentMember.Lag(12) :
[Time].[CalendarMonth].CurrentMember,
[Measures].[Revenue Actual])
My cube looks like this:
Time Dimension:
*CalendarYear
**CalendarQuarter
***CalendarMonth
Fact_Revenue
Fulldate, Program_Name, Revenue_Actual, Revenue_Plan
When calculating the averages, it resets itself as soon as it passes a YEAR
or QUARTER boundary. For example, if I look at (2004, Q1, Month 3) it will
show a correct average for only the 2004 Q1 Months 1,2 and 3. It is not
able to figure in the averages of values that fall in a different quarter or
year.
I'm not sure if this is an error with my MDX expression, my Time dimension,
or what. Does anyone have any suggestions on how to do this?
Thanks,
-s

3.switch cubes within virtual cube

i want to be able to switch the physical cubes that a virtual cube is
looking at (same structure etc) , via DSO ... has anbody done this ?
the mdstores objects are read only , how does analysis manager do it does
it recreate the cube on the fly when you change structure ?
any ideas !!
mark

4.SQL Average Hourly Value within Time Period

I would like to modify the SQL statement listed below to
output the average value for FullScan_Sec over the
date_time interval BETWEEN '20040711' and '20040801'
with a single value for each hour. Each average hourly
value over the 3 week interval.
Thanks,
Mark
Output Wanted:
Date_Time FullScan_Sec
'2004-08-01 01:00:000' 234.7
'2004-08-01 02:00:000' 246.4
'2004-08-01 03:00:000' 345.2
.
.
'2004-07-11 23:00:000' 312.6
select dateadd(hour,datediff(hour,'20040801',
[date_Time]),'20040801') as HourStart,
avg([FullScan_Sec]) as FullScan
from KLRP_New
where date_time BETWEEN '20040711' and '20040801'
group by dateadd(hour,datediff(hour,'20040801',
[date_Time]),'20040801')
order by dateadd(hour,datediff(hour,'20040801',
[date_Time]),'20040801')

5.how to calculate average within a year before grouping by year

I have two tables, one listing events, and another listing documents
published about the event. I would like to calculate the average lag
between event and publication for each year, and then present the data
grouped by year. I have got to this point, but the averages are coming
out way too large, so I assume that the average function isn't working:
SELECT AVG(tbldocuments.datDate - tblevents.datDate) AS timelag,
YEAR(tblevents.datDate) AS year
FROM tblevents
INNER JOIN tbldocuments
ON tblevents.eventID = tbldocuments.eventID
GROUP BY year
ORDER BY year ASC
Can anyone help me with this?

6. Calculating averages in a cube

7. Calculate average in a multidimensional cube

8. The Average in SSAS Cubes