dbTalk Databases Forums  

How to display Dimension levels for reporting purpose

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


Discuss How to display Dimension levels for reporting purpose in the microsoft.public.sqlserver.olap forum.



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

Default How to display Dimension levels for reporting purpose - 10-24-2005 , 04:35 PM






I have Geography Dimension with the followng level
Region
District
Rep

I want to generate a result that will return
Region District Rep
I try using the Descendant but, it will give each under the same columns, I
want a column for each level, like what you get when you do Crossjoin

Thank you
Tomas


Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: How to display Dimension levels for reporting purpose - 10-24-2005 , 07:33 PM






I assume you are using a reporting tool like Reporting Services,
although you usually find these tools return a flattened rowset so some
of this information is already split out for you.

One possible solution is to create some calculated measures to return
the ancestor names. The following query works against the foodmart cube.
The columns are not in the right order, but if you are using a reporting
tool that should not be too much of an issue.

Quote:
WITH MEMBER [Measures].[CountryName] as 'Ancestor
([Customers].CurrentMember,[Country]).Name'
MEMBER [Measures].[StateName] as 'Ancestor
([Customers].CurrentMember,[State Province]).Name'

SELECT
[Customers].[City].members on Rows,
{[Measures].[CountryName]
,[Measures].[StateName]
,[Measures].[Store Sales]} on COLUMNS
FROM SALES
Quote:

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

Quote:
I have Geography Dimension with the followng level
Region
District
Rep

I want to generate a result that will return
Region District Rep
I try using the Descendant but, it will give each under the same columns, I
want a column for each level, like what you get when you do Crossjoin

Thank you
Tomas



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.