Page 1 of 1

mdx _ TM1SubsetBasis() in TI

Posted: Thu Oct 09, 2008 11:37 am
by Tilo
Does anyone know the mdx-Expression TM1SubsetBasis()? It is shown in the Subset Editor when creating a dynamic subset based on a filter on attribute values. Copying it into a TI-process as following

SubsetCreatebyMDX('Test','{FILTER({TM1SubsetBasis()},[TWSzenario].[Test]="0.00")}');

the process stops.

Error: (translated) "The subset cannot dissociated".

Re: mdx _ TM1SubsetBasis() in TI

Posted: Thu Oct 09, 2008 12:45 pm
by Tilo
{TM1SubsetBasis()} seems to be a placeholder that appears within Subset Editor.
I was not content with my status and tried replacing
{TM1SubsetBasis()}
with
{TM1SUBSETALL( [dimensionname] )}
and it worked.
Can somebody confirm my suggestion that is is a placeholder?

Re: mdx _ TM1SubsetBasis() in TI

Posted: Thu Oct 09, 2008 1:51 pm
by Mike Cowie
Tilo wrote:{TM1SubsetBasis()} seems to be a placeholder that appears within Subset Editor.
I was not content with my status and tried replacing
{TM1SubsetBasis()}
with
{TM1SUBSETALL( [dimensionname] )}
and it worked.
Can somebody confirm my suggestion that is is a placeholder?
Hi Tilo,

The TM1SubsetBasis function, as best I can tell, has always meant whatever was in the subset when you started recording via the Subset Editor. I really do hate the function because it tells you absolutely nothing about what the subset is actually based on. I always try to replace it with something more specific when I plan to keep the dynamic subset around for a while.

When using TM1SubsetCreateByMDX I can understand why it won't work - since you are creating a subset from scratch in this case there isn't really anything that it is starting with. It sounds like you've gotten it to work now, but I wanted to give some explanation why TM1SubsetBasis won't work.

Regards,
Mike

Re: mdx _ TM1SubsetBasis() in TI

Posted: Thu Oct 09, 2008 2:17 pm
by Tilo
Thanks Mike.
I'll keep the function in mind for more complex manipulation of subsets.
As far as I understand it can be used to structure the appearance of code (disentangle one long code to some smaller ones) because the TI reminds the latest (manipulated) subset structure while a process is running.

Re: mdx _ TM1SubsetBasis() in TI

Posted: Thu Oct 09, 2008 3:57 pm
by Mike Cowie
Tilo wrote:Thanks Mike.
As far as I understand it can be used to structure the appearance of code (disentangle one long code to some smaller ones) because the TI reminds the latest (manipulated) subset structure while a process is running.
I suppose it is possible, though I hadn't heard of anything like that before in the context of TI. I really think TM1SubsetBasis is only relevant when you're doing something in the Subset Editor, not TI. And, even if TI did understand it you still have no ability to see what is contained in TM1SubsetBasis making it incredibly hard to troubleshoot.

If you need to make your subset MDX expression more legible or compact you could also consider referring to other, saved public subsets (which could also be dynamic) by name using TM1's "additions" to MDX support: the [Dimension].[SubsetName] syntax or the TM1SubsetToSet function.

Regards,
Mike

Re: mdx _ TM1SubsetBasis() in TI

Posted: Fri Oct 10, 2008 12:34 am
by ScottW
Hi Tilo,

TM1SubsetBasis() is a placeholder for the subset of element(s) visible at the start when the statement was recorded.

If you were to open the *.sub file in notepad you would see the identity of the subset basis. The function TM1SubsetBasis() is therefore only relevant for recorded MDX expressions. As a general rule if I ever record a dynamic subset rather than write it from scratch I always go back and edit the expression to replace TM1SubsetBasis() with the relevant expression eg. [Periods].[Oct] as this makes the MDX statement explicit and understandable.

If you are using SubsetCreateByMDX in TI then you have to have a correct reference to dimension elements as there is no "subset basis"

Re: mdx _ TM1SubsetBasis() in TI

Posted: Fri Oct 10, 2008 1:07 am
by Mike Cowie
Is there an echo in here? ;)