TM1SUBSETALL vs .MEMBERS

Post Reply
davas
Posts: 4
Joined: Wed Aug 19, 2015 2:03 pm
OLAP Product: Cognos BI
Version: 10-2-0 64bit
Excel Version: 2010

TM1SUBSETALL vs .MEMBERS

Post by davas »

Hi,

I'm having an issue where by a number of duplicate items are appearing in a dynamic subset generated using the TM1SUBSETALL function. If I look at the 'All Members' subset, the hierarchy looks OK but the subset all one has members repeated at different levels.

My question is what is the TM1SUBSETALL function supposed to return and how is the behavior different to referencing .MEMBERS instead?

Is there a best practice around picking one or the other?

Documentation just declares TM1SUBSETALL : "This TM1® -specific MDX function returns the TM1 subset All of <dimname>. "

Thanks,

Chris
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: TM1SUBSETALL vs .MEMBERS

Post by David Usherwood »

From Phil Bichard's excellent MDX guide (http://bihints.com/book/export/html/68):
The basis for many queries, this returns (almost, see below) the entire dimension, which is the equivalent of clicking the ‘All’ button in the Subset Editor.
TM1SUBSETALL( [Product] )

Note that only the final instance in the first hierarchy of members that are consolidated multiple times is returned.

The Members function, on the other hand, delivers the full dimension, duplicates included:
[Product].Members
babytiger
Posts: 78
Joined: Wed Jul 31, 2013 4:32 am
OLAP Product: Cognos TM1, EP, Analyst
Version: 10.2.2
Excel Version: 2013
Location: Sydney AU

Re: TM1SUBSETALL vs .MEMBERS

Post by babytiger »

I think it depends on what your starting point is.

I have always used TM1SubsetAll([Dimension name]) to return a complete list of elements of the dimension, and the list is unique (ie. no dups). So, not too sure how you've build your MDX.
MK
davas
Posts: 4
Joined: Wed Aug 19, 2015 2:03 pm
OLAP Product: Cognos BI
Version: 10-2-0 64bit
Excel Version: 2010

Re: TM1SUBSETALL vs .MEMBERS

Post by davas »

Hi,

Thanks for your replies. It seems I was experiencing the exact opposite of the behavior of .MEMBERS and TM1SUBSETALL...

In my training and work with others, I've only really seen TM1SUBSETALL be used.

The dimension in PM (where some changes were made that highlighted this issue) looks fine but when doing a new subset there are elements appearing in multiple locations in the hierarchy (changes made to the consolidations and levels so the elements are shown in new location and old).

I've tried editing the dimension structure in Architect by hiding duplicates etc. but the dimension reverts when I re-open after saving.

UPDATE: I think I've figured out the cause of this behavior... there was a manual sort set on the dimension - I've switched to auto - hierarchy and it looks OK again.
Wim Gielis
MVP
Posts: 3234
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1SUBSETALL vs .MEMBERS

Post by Wim Gielis »

Hello,

I always use TM1SubsetAll instead of .Members.
I don't think I used the latter in the past, even though I know the function exists.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply