Page 1 of 1

MDX to filter by attribute - error forming tuple expression

Posted: Sat Feb 04, 2017 11:58 am
by Wim Gielis
Strange case here...

I have a very simple dimension, in fact I deleted everything that is not related to the issue.
I try to filter out the elements containing 'A' for the text attribute WorkCenter. Pretty easy you would imagine.

If the grandparent has children, then the 2 elements that should be returned, cannot be formed as a tuple.
If I break the links such that the grandparent has no children, then the 2 elements are returned fine.

See pictures in the Word doc please, I could only add 3 pictures I think.

The element weights are all 1.
The TM1 service has been restarted many times.
The same setup of dimension and elements and attribute works fine in a separate TM1 model.
Yet in this TM1 model, there is no dimension called 'WorkCenter' or other attribute in the model called 'WorkCenter'.
The dimension SCH_Work_Center is used only in 1 application cube and 1 element attributes cube and in its own element security cube.

Anyone has an idea ?

Re: MDX to filter by attribute - error forming tuple expression

Posted: Sat Feb 04, 2017 6:22 pm
by gtonkin
HI Wim,
I created the dim per the doc and added a measure called A for "good measure".

Code: Select all

{FILTER( {TM1SUBSETALL( [SCH_Work_Center] )}, [SCH_Work_Center].[WorkCenter] = "A")}
Returns the two elements as you would have expected. This is on 10.2.2 FP4.
Dim Structure
Dim Structure
SCH_WorkCenter.PNG (22.56 KiB) Viewed 3089 times
Not sure that it helps you any as no errors.
The difference, besides versions, may be that I do not have the dimension associated with any cubes, or any other dimensions with an alias containing a text attribute with values of "A" (I did add an attribute to an existing dimension to test this case too-no issues elements returned as expected).
Have you tried saving the dim with a new name to test if this happens in any dim?

Re: MDX to filter by attribute - error forming tuple expression

Posted: Sat Feb 04, 2017 10:16 pm
by Wim Gielis
Thank you very much for testing George.
In a new dimension it works fine.