![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an star schema datasource, and an OLAP cube sitting on top of it. I would like to run an MDX query that does something like: Give me all the measures, with time on the rows, but I want only the values between time X and time Y. The problem, however, is that time X and Y come from a calendar control on a UI. Thus, I do not know if time X or time Y are in the cube. Can I do a query that returns all the values and only includes values between X and Y, where X and Y are not necessarily in the cube ? Does that make sense ? Maybe I should illustrate further I have a time dimension Time: id Year Month Day 1 2004 Jan 4 2 2004 Jan 6 3 2004 Jan 8 and a fact table Fact: Time_id Volume Response time 1 40 8 2 25 13 3 80 17 I would like to see the volume and response time between Jan 1st 2004 and March 30th 2004. Is that possible given the data above ? If so, then can somebody explain how. Thanks in advance to reply remove the _NO_SPAM bdennehy_NO_SPAM (AT) westglobal (DOT) com |
#3
| |||
| |||
|
|
There is usually very little benefit in using a Surrogate Key for the Time Dimension (your time_id attribute) as the date is always the date. Your Time Dimension can be keyed by Date instead of "id". A Time Dimension should also be extensive.... it should include many more dates than are evident in your Fact tables. Then you can select data from your Fact table by Date Range directly, or via a Join to the Time Dimension. MichaelR On Thu, 27 Jan 2005 10:04:37 -0000, "Brian Dennehy" denno88_NOSPAM_ (AT) yahoo (DOT) com> wrote: I have an star schema datasource, and an OLAP cube sitting on top of it. I would like to run an MDX query that does something like: Give me all the measures, with time on the rows, but I want only the values between time X and time Y. The problem, however, is that time X and Y come from a calendar control on a UI. Thus, I do not know if time X or time Y are in the cube. Can I do a query that returns all the values and only includes values between X and Y, where X and Y are not necessarily in the cube ? Does that make sense ? Maybe I should illustrate further I have a time dimension Time: id Year Month Day 1 2004 Jan 4 2 2004 Jan 6 3 2004 Jan 8 and a fact table Fact: Time_id Volume Response time 1 40 8 2 25 13 3 80 17 I would like to see the volume and response time between Jan 1st 2004 and March 30th 2004. Is that possible given the data above ? If so, then can somebody explain how. Thanks in advance to reply remove the _NO_SPAM bdennehy_NO_SPAM (AT) westglobal (DOT) com |
![]() |
| Thread Tools | |
| Display Modes | |
| |