SubsetCreatebyMDX - remove negatively weighted elements
Posted: Thu Jul 01, 2010 2:00 am
All of my cubes have drill through to cube detail setup.
I use a fairly generic MDX expression to expand consolidated elements to the lowest level where DTYPE returns C (consolidated element):
MDXString='{TM1FILTERBYLEVEL( {DESCENDANTS([' | MyDim | '].[' | Account | ']) }, 0)}';
This works really well except where consolidations have negative weightings which results in the children of any negatively weighted consolidations being included in the subset twice instead of being excluded altogether.
So I'm trying to work out a way to exlude the DESCENDANTS of any consolidations with a negative weighting.
To my knowledge you cannot refer to element "Weight" as if it were an attribute which could be used in FILTER??
I also thought that if a could do a COUNT on all N Level elements then maybe I could exclude anything where the count was greater than 1.
Can anyone think of a simple way to solve deal with this situation? If I cannot use MDX then I guess I could do some more detailed processing through the TI inserting elements into temporary subsets etc.
cheers
jed
I use a fairly generic MDX expression to expand consolidated elements to the lowest level where DTYPE returns C (consolidated element):
MDXString='{TM1FILTERBYLEVEL( {DESCENDANTS([' | MyDim | '].[' | Account | ']) }, 0)}';
This works really well except where consolidations have negative weightings which results in the children of any negatively weighted consolidations being included in the subset twice instead of being excluded altogether.
So I'm trying to work out a way to exlude the DESCENDANTS of any consolidations with a negative weighting.
To my knowledge you cannot refer to element "Weight" as if it were an attribute which could be used in FILTER??
I also thought that if a could do a COUNT on all N Level elements then maybe I could exclude anything where the count was greater than 1.
Can anyone think of a simple way to solve deal with this situation? If I cannot use MDX then I guess I could do some more detailed processing through the TI inserting elements into temporary subsets etc.
cheers
jed