210 • Developing Essbase Applications: Advanced Techniques for Finance and IT Professionals
Note that with the Union() function, using the ALL keyword will retain duplicates.
Union({[Year].Members}, {[Year].Children}, ALL)
6.10.1.3 Querying for Descendants ese examples show how to query descendants.
To save some trees, I will not output all the results because the results should be pretty
self-explanatory.
is query will return descendants, including the query member. Note that this func-
tion works with any member, not just the dimension root, so you could use a member
that is in the middle of the hierarchy and return all descendants from that member down.
SELECT {} ON AXIS(0),
{Descendants([Year])} ON AXIS(1)
FROM [Sample.Basic];
is query ret ...