MDX to eliminate consolidations without children

Post Reply
vladkon
Posts: 34
Joined: Mon Oct 18, 2010 7:38 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

MDX to eliminate consolidations without children

Post by vladkon »

I have a dimension with 6-levels unbalanced hierarchy. Is it possible to write an MDX to create dynamic subset that includes only those parts of hierarchy tree that has all 6 levels, and not those that have less levels? Any advise greatly appreciated.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: MDX to eliminate consolidations without children

Post by rmackenzie »

Reading your post title and your actual post, I'm thinking that you are experiencing the problem of asking for level-0 members of the dimension but having the consolidations with no children returned in that set. Is that correct? If so, you need to post-process your dimension after update, and use an attribute to flag the elements that are genuine leaves - you can use DTYPE to do this (in TI, not in MDX). Then your MDX can use FILTER and this attribute, rather than TM1FILTERBYLEVEL on level 0 which will return the unwanted empty consolidations.
Robin Mackenzie
Post Reply