dbTalk Databases Forums  

How to get Year & Quarter title in MDX?

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


Discuss How to get Year & Quarter title in MDX? in the microsoft.public.sqlserver.olap forum.



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

Default How to get Year & Quarter title in MDX? - 06-06-2004 , 01:15 AM






What is the right way in MDX to get a double title of the Years and the
Quarters?
When I'm trying the following syntax I receive an error message:
CROSSJOIN([Time].[Year].Members,[Time].[Quarter].Members) ON COLUMNS



Reply With Quote
  #2  
Old   
Martin Mason
 
Posts: n/a

Default Re: How to get Year & Quarter title in MDX? - 06-07-2004 , 09:22 PM






Use the Generate Function combined with the Descendants function.

{ Generate( { [Time].[Year].Members}, Descendants( [Time].CurrentMember,
[Time].Quarter, SELF_AND_BEFORE)) } ON COLUMNS


"Geri Reshef" <GeriReshef (AT) Tapuz (DOT) co.il> wrote

Quote:
What is the right way in MDX to get a double title of the Years and the
Quarters?
When I'm trying the following syntax I receive an error message:
CROSSJOIN([Time].[Year].Members,[Time].[Quarter].Members) ON COLUMNS





Reply With Quote
  #3  
Old   
Geri Reshef
 
Posts: n/a

Default Ufortunately I still get one line header.. - 06-08-2004 , 02:07 AM



I get one line header: 1997,Q1,Q2,Q3,Q4,1998,Q1,Q2,Q3,Q4
While I need a two line Header:
Quote:
1997 | 1998 |
Q1|Q2|Q3|Q4|Q1|Q2|Q3|Q4|
Thnak you anyway!

"Martin Mason" <martin.mason (AT) earthlink (DOT) net> wrote

Quote:
Use the Generate Function combined with the Descendants function.

{ Generate( { [Time].[Year].Members}, Descendants( [Time].CurrentMember,
[Time].Quarter, SELF_AND_BEFORE)) } ON COLUMNS


"Geri Reshef" <GeriReshef (AT) Tapuz (DOT) co.il> wrote in message
news:eb4VvV4SEHA.3608 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
What is the right way in MDX to get a double title of the Years and the
Quarters?
When I'm trying the following syntax I receive an error message:
CROSSJOIN([Time].[Year].Members,[Time].[Quarter].Members) ON COLUMNS







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.