kyooryu
kyooryu

Reputation: 1509

MDX - CHILDREN doesn't return any values, MEMBERS do

I used the following expression in MDX:

SELECT
null ON 0,
[dim].[hier].CHILDREN ON 1
FROM [Cube]

It did not return any values. However, when I issued

SELECT
null ON 0,
[dim].[hier].[hier].MEMBERS ON 1
FROM [Cube]

It worked. What is interesting, yesterday first query was working too, so I suspect some cube change might've caused that, however I don`t have an access so I cannot check it.

Is there some subtle difference between CHILDREN and MEMBERS which causes that bahaviour? I thought the two are similar except for the fact that CHILDREN digs one level down.

Upvotes: 0

Views: 242

Answers (2)

Lucie Vinecká
Lucie Vinecká

Reputation: 1

it is not working cause of this: Do not Forget on this brackets {} >> which bounds the couple on a row (on 1)

SELECT NON EMPTY AddCalculatedMembers  ( { [member name].[].[].&[]&[].children, [member name].[].[].&[1]&[].children } )  on 1, [Measures].[Sales] on 0 FROM [Cube Name];

Upvotes: 0

Marc Polizzi
Marc Polizzi

Reputation: 9375

Not sure about the exact semantic of CHILDREN in case you apply it to a non-member; i.e., not sure it is implemented as MEMBERS. But to reply to this sentence :

CHILDREN digs one level down

no; children returns the children of the member it is applied to. Those children does not necessarily belong to the next level down. In case of a ragged hierarchy, the children could be several levels down.

Upvotes: 1

Related Questions