|
Home > Archive > MS SQL Server OLAP > September 2005 > access to one more cube?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
access to one more cube?
|
|
| Word 2003 memory Leakage 2005-09-26, 11:23 am |
| Hi,
I would like to use lookupcube to access to one more cube. I could not
specify time range in lookupcube functions.
the following is not working. If I just specify a year (2002), it works.
with
MEMBER [Measures].[ManHours] AS
'LookupCube("Cube_Extra",
"(" + "[Dim_Time].[Year - Quarter - Month -
actualDate].[Year].&[2002].&[2]:
[Dim_Time].[Year - Quarter - Month -
actualDate].[Year].&[2002].&[12]"
+ ", [Measures].& #91;manHoursWorkedTo
tal])"
)
'
thanks,
Guangming
| |
|
| you'll need to be referencing the time dimension member of the cube you are
currently in ( let's say cube [Current Cube] that has a time dimension like
this [Time].[CurrentMember ) and hopefully both cubes have the same naming
for the time dimension:
so your calc should look something like this:
MEMBER [Measures].[ManHours] AS '
LookupCube( "Cube_Extra",
"(" + MemberToString([Time].CurrentMember)
+ ", [Measures].& #91;manHoursWorkedTo
tal])"
)
'
"Word 2003 memory Leakage" wrote:
> Hi,
>
> I would like to use lookupcube to access to one more cube. I could not
> specify time range in lookupcube functions.
>
>
> the following is not working. If I just specify a year (2002), it works.
>
> with
> MEMBER [Measures].[ManHours] AS
> 'LookupCube("Cube_Extra",
> "(" + "[Dim_Time].[Year - Quarter - Month -
> actualDate].[Year].&[2002].&[2]:
> [Dim_Time].[Year - Quarter - Month -
> actualDate].[Year].&[2002].&[12]"
> + ", [Measures].& #91;manHoursWorkedTo
tal])"
> )
> '
>
> thanks,
>
> Guangming
| |
| Word 2003 memory Leakage 2005-09-27, 8:24 pm |
| thank you very much,
I am working in sql server 2005 beta 2. I put all fact tables in one cube,
and this solved the problem. I can set the right time dimensions to all fact
tables. Then I get the measures from each fact tables all sliced by the time
specified.
It is similar to a join in SQL. Is there a way to join two cubes rather than
specifying time dimensions to each fact table.
Guangming
"mike" wrote:
[color=darkred]
> you'll need to be referencing the time dimension member of the cube you are
> currently in ( let's say cube [Current Cube] that has a time dimension like
> this [Time].[CurrentMember ) and hopefully both cubes have the same naming
> for the time dimension:
>
> so your calc should look something like this:
>
> MEMBER [Measures].[ManHours] AS '
> LookupCube( "Cube_Extra",
> "(" + MemberToString([Time].CurrentMember)
> + ", [Measures].& #91;manHoursWorkedTo
tal])"
> )
> '
>
> "Word 2003 memory Leakage" wrote:
>
|
|
|
|
|