mdx _ TM1SubsetBasis() in TI

Post Reply
Tilo
Posts: 50
Joined: Mon Oct 06, 2008 4:27 pm
Location: Hamburg

mdx _ TM1SubsetBasis() in TI

Post 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".
Tilo
Posts: 50
Joined: Mon Oct 06, 2008 4:27 pm
Location: Hamburg

Re: mdx _ TM1SubsetBasis() in TI

Post 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?
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: mdx _ TM1SubsetBasis() in TI

Post 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
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Tilo
Posts: 50
Joined: Mon Oct 06, 2008 4:27 pm
Location: Hamburg

Re: mdx _ TM1SubsetBasis() in TI

Post 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.
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: mdx _ TM1SubsetBasis() in TI

Post 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
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
ScottW
Regular Participant
Posts: 152
Joined: Fri May 23, 2008 12:08 am
OLAP Product: TM1 CX
Version: 9.5 9.4.1 9.1.4 9.0 8.4
Excel Version: 2003 2007
Location: Melbourne, Australia
Contact:

Re: mdx _ TM1SubsetBasis() in TI

Post 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"
Cheers,
Scott W
Cubewise
www.cubewise.com
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: mdx _ TM1SubsetBasis() in TI

Post by Mike Cowie »

Is there an echo in here? ;)
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Post Reply