![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm looking for a way of assigning a cube intrinsic property (specifically, CUBE_NAME) to a member, in such a way that I can then use that value in a LookUpCube query on a second cube; basically, I'm trying to define a standard calculated member which will encapsulate the LookUpCube logic, and install that calculated member in multiple cubes. For the logic to work as planned, the calculated member will need to be able to sense which cube it's in (hence the question). In case that's not clear, here's an example. If I execute the following query in FoodMart 2000 in the MDX Sample Application select {measures.[unit sales]} properties cube_name on 0 from sales I can then click on the column heading {Unit Sales] and see the property returned, as [Measures].[CUBE_NAME], with the value "Sales". However, what I would *like* to do is to be able to assign that value to a calculated member, along the lines of: with member [measures].[cube name] as 'properties cube_name' select {measures.[cube name]} on 0 from sales or with member [measures].[cube name] as '[measures].[unit sales].properties("cube_name")' select {measures.[cube name]} on 0 from sales .... but neither of these works! :-) Any ideas? If I can get the cube name assigned in such a way, the rest of the requirement is quite straightforward. Cheers, Koan |
#3
| |||
| |||
|
|
I can't think of a way to do this, and in any case I would recommend you don't use the LOOKUPCUBE function: anything you can do with LOOKUPCUBE you should be able to do with a virtual cube, and the virtual cube approach is likely to perform much, much better. What is it you're trying to achieve here? |
#4
| |||
| |||
|
|
Subject: RE: Assigning an Intrinsic property to a calculated member From: Koan B <koanb (AT) newsgroups (DOT) nospam References: <Xns95A279251B16Akoanbee (AT) 207 (DOT) 46.248.16 6F08F171-2494-42D2-B974-12A89C5B2547...soft (DOT) com Message-ID: <Xns95A2ADE807823koanbee (AT) 207 (DOT) 46.248.16 User-Agent: Xnews/06.02.16 Newsgroups: microsoft.public.sqlserver.olap Date: Mon, 15 Nov 2004 09:05:41 -0800 NNTP-Posting-Host: exony-ltd-02.altohiway.com 213.83.66.226 Lines: 1 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09 |
|
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:54984 X-Tomcat-NG: microsoft.public.sqlserver.olap "=?Utf-8?B?Q2hyaXMgV2ViYg==?=" OnlyForPostingToNewsgroups (AT) hotmail (DOT) com> wrote in news:6F08F171-2494-42D2-B974-12A89C5B2547 (AT) microsoft (DOT) com: I can't think of a way to do this, and in any case I would recommend you don't use the LOOKUPCUBE function: anything you can do with LOOKUPCUBE you should be able to do with a virtual cube, and the virtual cube approach is likely to perform much, much better. What is it you're trying to achieve here? Appreciate the reply; but I've already described as much as I'm at liberty to (about what I'm trying to achieve) in the original post. I'm well aware of the impact of using LookUpCube; despite that, it is the right approach for this particular requirement. Sorry to appear vague, but I have to respect my company's policy on IPR; specifically, about not inadvertently disclosing any. Cheers, Koan |
#5
| |||
| |||
|
|
I think this cannot be implemented because intrinsic member properties is different from member properties. For example, you can use the following MDX to return member perperites directly: /Snip |
|
The workaround here is to create new member properties of cube name on dimension members and then use a calcuated measure to show the cube_name by using this member property. /Snip |
#6
| |||
| |||
|
|
Subject: RE: Assigning an Intrinsic property to a calculated member From: Koan B <koanb (AT) newsgroups (DOT) nospam References: <Xns95A279251B16Akoanbee (AT) 207 (DOT) 46.248.16 6F08F171-2494-42D2-B974-12A89C5B2547...soft (DOT) com |
|
Message-ID: <Xns95A35B4148F2Ekoanbee (AT) 207 (DOT) 46.248.16 User-Agent: Xnews/06.02.16 Newsgroups: microsoft.public.sqlserver.olap Date: Tue, 16 Nov 2004 00:58:14 -0800 NNTP-Posting-Host: exony-ltd-02.altohiway.com 213.83.66.226 Lines: 1 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11 |
|
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55011 X-Tomcat-NG: microsoft.public.sqlserver.olap petery (AT) online (DOT) microsoft.com (Peter Yang [MSFT]) wrote in news:3#I2Tb7yEHA.3028 (AT) cpmsftngxa10 (DOT) phx.gbl: I think this cannot be implemented because intrinsic member properties is different from member properties. For example, you can use the following MDX to return member perperites directly: /Snip Agreed Snip The workaround here is to create new member properties of cube name on dimension members and then use a calcuated measure to show the cube_name by using this member property. /Snip I have settled on a different workaround; using DSO to read the cube name and insert it in the appropriate place of the calculated member definition. Thanks again for your reply! Cheers, Koan |
![]() |
| Thread Tools | |
| Display Modes | |
| |