Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stairway to MDX - STEP 6: Member “Family” Functions: .Parent and .Children


Stairway to MDX - STEP 6: Member “Family” Functions: .Parent and .Children

Author
Message
Bill_Pearson
Bill_Pearson
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 85
Comments posted to this topic are about the item Stairway to MDX - STEP 6: Member “Family” Functions: .Parent and .Children
darth_vodka
darth_vodka
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 Visits: 411
a very simple question that I'm sure I did before, but is eluding me...

how do you get

[Bikes] [Mountain NBikes]
[Bikes] [Road Bikes]
[Bikes] [Touring Bikes]

onto the rows? i.e. A parent and its children on the rows

ta
ldorian81
ldorian81
Old Hand
Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

Group: General Forum Members
Points: 398 Visits: 314
Brilliant Stairways series,

1 Note to make in the example code, when instructed to copy & paste out on each section of code where you have written [Calendar Year] on the Columns there is a double space between the two words which will error the query.


Query (2, 14) The MEMBERS function expects a hierarchy expression for the argument. A member expression was used.


Just for info as sometimes not easily spotted. :-D

edit:
Also on [Product Line] & [Customer Geography]


SELECT
NON EMPTY {[Date].[Calendar].[Calendar Year].MEMBERS} ON AXIS(0),
NON EMPTY {
[Product].[Product Model Lines].[Product Line].[Accessory].CHILDREN}
ON AXIS(1)

FROM
[Adventure Works]

WHERE
([Measures].[Internet Order Quantity],
[Customer].[Customer Geography].[Country].[United Kingdom])



Regards
ld

Stoke-on-Trent
United Kingdom

If at first you don't succeed, go to the pub and drink away your current thought plan.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search