Even without splitting the [Time] dimension, you should be able to
significantly improve performance by using cube aggregations for the
Average at the Hour level and below:
Quote:
|
Avg(Filter(Descendants(Time.CurrentMember,Hour),
|
Rank(Time.CurrentMember,Time.CurrentMember.Sibling s)
Quote:
9 And
Rank(Time.CurrentMember,Time.CurrentMember.Sibling s)
|
< 18), Measures.PerfSum/Measures.PerfCount)
Here, I assume that there are 2 measures defined on the Utilization
column, a "sum" aggregation: PerfSum and a
"count" aggregation: PerfCount (which is a sample count)
The approach that I have used to split the [Time] dimension is as
follows (there may be other approaches as well):
1) Use separate Date and TimeOfDay dimension tables. These
can be generated via SQL scripts if they don't exist.
The Date table would have a row for each day of interest
and the TimeOfDay a row for each minute of a day.
2) Since SQL Server has a combined DateTime, define a view
on the fact table with derived fields to join to the 2
dimension tables. Eg: convert(varchar,MyTime,101) for
date and left(convert(varchar,MyTime,8),5) for time.
3) If Business Hours are fixed, a flag field for this can
be added to the time table/view and used in TimeOfDay.
Here is a paper by Tom Chester on Time Dimensions:
http://www.sqljunkies.com/Article/D1...F20D60951395.s
cuk
- Deepak
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!