Dynamics Subsets in multi Hierarchy Dimension

Post Reply
Armonds
Posts: 5
Joined: Thu Mar 28, 2013 8:46 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Dynamics Subsets in multi Hierarchy Dimension

Post by Armonds »

I have Dimension:
Group1
Elem1 (attribute: H1)
Elem2 (attribute: H1)
Group2 (attribute: H1)
Elem3 (attribute: H1)
Elem4 (attribute: H1)

I need to create dynamic subset sorted by hierarchy. I generated expression:

Code: Select all

HIERARCHIZE( {FILTER( {TM1SUBSETALL([TestDim])}, [TestDim].[Hierarchy] = "H1")} ) }
but after executing it the result is sorted by index nod by hierarchy:
Elem1 (attribute: H1)
Elem2 (attribute: H1)
Group2 (attribute: H1)
Elem3 (attribute: H1)
Elem4 (attribute: H1)

If I manually in subset editor filter by attribute H1 and press Hierarchy sort button, it sorts elements as I need it:
Group2 (attribute: H1)
Elem1 (attribute: H1)
Elem2 (attribute: H1)
Elem3 (attribute: H1)
Elem4 (attribute: H1)

How to correct dynamic subset expression?
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by mvaspal »

Hi
but after executing it the result is sorted by index nod by hierarchy
Actually, at the same time this is also a hierarchical sort.
I have just quickly created a dimension with the elements and order:
Elem1
Elem2
Group2
Elem3
Elem4

If you sort this dimension hierarchically, you will still get the same result. I don't think hierarchy sort puts cons elements before orphan N elements if these N elements are before the cons elements in the dimension sort order.
Armonds
Posts: 5
Joined: Thu Mar 28, 2013 8:46 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by Armonds »

made some screens:
1. all elements
Image
2. expression output
Image
3. manually filtered and pressed hierarchy sort
Image
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by mvaspal »

Hi
Are you sure the first screen is after 'All' ? If Elem2 is child of both Group1 and Group2, then 'All' usually does not show it under both; only if you collapse and re-expand the second parent.

How is your dimension ordered? Manually? Can you also send a screen from your dimension editor directly after opening it?
Armonds
Posts: 5
Joined: Thu Mar 28, 2013 8:46 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by Armonds »

Yes, You right, i expanded second group.

Image
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by mvaspal »

The really interesting is that when you choose record expression, then do the filtering manually and then save the expression, it looks good. And then when you reopen it, the hierarchical structure gets lost
Armonds
Posts: 5
Joined: Thu Mar 28, 2013 8:46 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by Armonds »

Yes, and I'm stuck at this. As alternative I think I will made static subset with TI process.
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Dynamics Subsets in multi Hierarchy Dimension

Post by mvaspal »

it seems that it first creates the hierarchy order (in which elem2 and elem3 is before Group2) and then filters the elements, even if the filter expression is within the Hierarchize expression
Post Reply