Tuesday, July 29, 2014

AllMembers vs Children

Both do what their name implies Knipogende emoticon .
AllMembers will return All Members on the current level and all levels below.
SELECT
    {       
        ([Date].[Calendar Year].&[2013], [Measures].[Sales Amount])
    }
ON COLUMNS
,
    {
        ([Product].[Product Model Lines].AllMembers)
    } ON ROWS
FROM
   [Adventure Works]
Will give us:
image
Children will give us all members on the first level below the current level.
SELECT
    {       
        ([Date].[Calendar Year].&[2013], [Measures].[Sales Amount])
    }
ON COLUMNS
,
    {
        ([Product].[Product Model Lines].Children)
    } ON ROWS
FROM
   [Adventure Works]
Will give us:
image
Have Fun And Till Next Time

No comments:

Post a Comment