We have discovered what we believe to be a pretty significant defect in the TM1 server's MDX engine. Before I go to the trouble of creating a support ticket and reproducible test case I thought it would be good to first see if other customers and partners are also aware of this current MDX limitation and if
@Hubert Heijkers or
@STUART KING are aware of the defect and if plans already exist to fix it.
I will try and be as clear and succinct as possible in explaining the issue.
In a dimension containing alternate hierarches when querying a cell value via MDX for an intersection containing a
leaf member if
any hierarchy other than the same named hierarchy is addressed for the member then the query will return no data. For consolidated elements the MDX works as expected and alternate hierarchies can be addressed and data is returned. Since leaf elements are "shared resources" what
should happen is that regardless of which alternate hierarchy is referenced the same value shoudl be returned (as long as the leaf element in question is a member of that hierarchy).
Let's try and make a very simple example. We have a dimension
Product which contains hierarchies
Product,
Brand,
Color,
Size and
Leaves. Product
ABC is a leaf and is present in all hierarchies. The dimension is used in a cube called
Sales which for simplicity just contains 2 other dimensions,
Time and
Sales Measure. The use case is that we want a member set query on the Time dimension to return the periods in which there are sales of ABC. So the MDX looks like this ...
{Filter(
{TM1FilterByLevel(
{TM1SubsetAll([Time].[Time])},
0
)},
[Sales].([Time].[Time].CurrentMember,[Product].[Product].[ABC],[Sales Measure].[Sales Measure].[Sales])>0
)}
The above MDX will work and return the set of leaf elements in
Time which have sales of ABC.
However, if we address any other hierarchy of Product then TM1 returns a null set. If querying for a consolidation not a leaf then the appropriate hierarchy can be addressed and the MDX works.
This is clearly a defect as 1) it shouldn't matter which hierarchy in Product we use to address ABC as the result should be the same in all and 2) if you have a leaf element
which isn't in the same named hierarchy then you are flat out of luck, there's no way to address the value in a filter.
Provided the same named hierarhcy always contains all leaves it is possible to work around this by first checking the element level and if a leaf then ignore the hierarchy context and substitute the same named hierarchy. But this is a sub-optimal workaround, we shoudl be able to just use the currently selected hierarchy.
I hope that made sense. Anyone else hase come accross this? And anyone from IBM able to comment on when it might be fixed?
------------------------------
Scott Wiltshire
------------------------------
#PlanningAnalyticswithWatson