Skip to main content

Accessing Siblings

Accessing Siblings

The system provides the following MDX functions that access siblings of a member:

  • FIRSTSIBLING returns the first sibling, if any, of a given member. For example:

    SELECT MEASURES.[%COUNT] ON 0, birthd.[Q1 1920].FIRSTSIBLING ON 1 FROM demomdx
    
                                        %COUNT
    Q1 1920                                   *
    
    
  • LASTSIBLING returns the last sibling, if any.

  • SIBLINGS returns the given member and all its siblings. For example:

    SELECT MEASURES.[%COUNT] ON 0, homed.cypress.SIBLINGS ON 1 FROM demomdx
     
                                        %COUNT
    1 Cypress                               112
    2 Magnolia                              114
    3 Pine                                  121
    
    
FeedbackOpens in a new tab