dbTalk Databases Forums  

Display Parent details

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Display Parent details in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Manoj
 
Posts: n/a

Default Display Parent details - 12-15-2004 , 08:49 AM






Hello,

I am writing a MDX Query which will show the Sales Information of Product
dimension. I am passing the Brand Name to the query and I expect to get the
Sales for Brand Name, Product Subcategory, Product Category, Product
Department and Product Family for the selected Brand Name for the customers
in Canada..

Below is my MDX Query:

Select
{[Measures].[Unit Sales]} On Columns,
NonEmptyCrossJoin({[Customers].[Canada].Children, Descendants([Product].[All
Products].[Drink].[Alcoholic Beverages].[Beer and Wine].[Beer].[Good], 5,
Self_And_Before)) On Rows
From
Sales

Please help me in resolving this.

Thanks in advance.

Manoj


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Display Parent details - 12-15-2004 , 07:39 PM






Are you looking for hierarchized details like this?

Quote:
Select
{[Measures].[Unit Sales]} On Columns,
NON EMPTY
Hierarchize(Except(Generate(Filter(
[Product].[Brand Name].Members,
[Product].CurrentMember.Name = "Good"),
Ascendants([Product].CurrentMember)),
{[Product].[All Products]})) On Rows
From Sales
Where ([Customers].[All Customers].[USA].[OR])
Quote:

- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.