Playing around with this I've found that when you use Union:
Returns a set that is generated by the union of two sets, optionally retaining duplicate members.
When I record the expression and Select All Elements then Level 0, I get the intended result (note I have a hierarchy that starts at Europe):
Code: Select all
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Entity] )}, 0)}
Amending this to view all elements under Europe changes this too:
Code: Select all
{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Entity].[Europe]},ALL,RECURSIVE)}, 0)}
Which I've found to return duplicates.
However, adding a Union to this statement removes the duplicates:
Code: Select all
{UNION(
{TM1FILTERBYLEVEL(
{TM1DRILLDOWNMEMBER( {[Entity].[Europe]}, ALL, RECURSIVE )}
,0)},
{[Entity].[Europe]}
)}
To
include the duplicates you would amend the statement to:
Code: Select all
{UNION(
{TM1FILTERBYLEVEL(
{TM1DRILLDOWNMEMBER( {[Entity].[Europe]}, ALL, RECURSIVE )}
,0)},
{[Entity].[Europe]}, ALL
)}