dbTalk Databases Forums  

Question on YTD

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


Discuss Question on YTD in the microsoft.public.sqlserver.olap forum.



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

Default Question on YTD - 04-06-2004 , 12:49 PM






Hello everyone,

Here my problem, I have a customer who want to have YTD on columns, and
measures on row..

Here an example of want I would like to achieve

WITH MEMBER [TIME].[1998 YTD] AS 'ClosingPeriod(Month, [Time].[1998])'
MEMBER [TIME].[1997 YTD] AS
'ParallelPeriod(Year,1,ClosingPeriod(Month, [Time].[1998]))'

SELECT {[TIME].[1998 YTD],[TIME].[1997 YTD]} ON ROWS, Measures.members on
columns from sales


Currently the query return only the value for the last month of 1998, and
the same month in 1997. But I would like to have the same grid but with the
1998 to 'ClosingPeriod(Month, [Time].[1998]) and the same period last year.

If I try with

WITH MEMBER [TIME].[1998 YTD] AS 'YTD(ClosingPeriod(Month, [Time].[1998]))'
MEMBER [TIME].[1997 YTD] AS
'YTD(ParallelPeriod(Year,1,ClosingPeriod(Month, [Time].[1998])))'

SELECT {[TIME].[1998 YTD],[TIME].[1997 YTD]} ON ROWS, Measures.members on
columns from sales

i got the error... (hint you can copy paste messagebox since windows 2000)

---------------------------
MDX Sample Application
---------------------------
Unable to open cellset

Formula error - cannot convert set to Expression - in the PeriodsToDate
function


---------------------------
OK
---------------------------

Thanks

Best regards,

Patrice




Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Question on YTD - 04-06-2004 , 02:41 PM






YTD returns a set of Time members
You need to sum over that set to return a value

'Sum(YTD(ClosingPeriod(Month, [Time].[1998])))

HTH
Bria
www.geocities.com/brianaltmann/olap.htm


Reply With Quote
  #3  
Old   
Patrice Lamarche
 
Posts: n/a

Default Re: Question on YTD - 04-06-2004 , 02:57 PM



Geez ... I was sure that i try it.

Thanks !
"Brian Altmann" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
YTD returns a set of Time members.
You need to sum over that set to return a value:

'Sum(YTD(ClosingPeriod(Month, [Time].[1998])))'

HTH,
Brian
www.geocities.com/brianaltmann/olap.html




Reply With Quote
  #4  
Old   
Andrej Hudoklin
 
Posts: n/a

Default Re: Question on YTD - 04-07-2004 , 09:40 AM



If I understand your question, you would like to have YTD as a member of one
dimensions
and as you select the measure the YTD column would give you the YTD value
for that measure?

If so, then you can create so called SHELL dimension.

If yes I can send you some instructions how to do that.


Peace,
Andrej



"Patrice Lamarche" <Patrice_lamarche (AT) gco (DOT) ca.nospam> wrote

Quote:
Geez ... I was sure that i try it.

Thanks !
"Brian Altmann" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:FD33F423-8300-4DEC-AF58-B2C3498456B7 (AT) microsoft (DOT) com...
YTD returns a set of Time members.
You need to sum over that set to return a value:

'Sum(YTD(ClosingPeriod(Month, [Time].[1998])))'

HTH,
Brian
www.geocities.com/brianaltmann/olap.html






Reply With Quote
  #5  
Old   
Patrice Lamarche
 
Posts: n/a

Default Re: Question on YTD - 04-08-2004 , 11:44 AM



Thanks, yes i would like to have the way to create a SHELL dimension

Patrice
"Andrej Hudoklin" <andrej.hudoklin (AT) add (DOT) si> wrote

Quote:
If I understand your question, you would like to have YTD as a member of
one
dimensions
and as you select the measure the YTD column would give you the YTD value
for that measure?

If so, then you can create so called SHELL dimension.

If yes I can send you some instructions how to do that.


Peace,
Andrej



"Patrice Lamarche" <Patrice_lamarche (AT) gco (DOT) ca.nospam> wrote in message
news:%23tS5PFBHEHA.2180 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Geez ... I was sure that i try it.

Thanks !
"Brian Altmann" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:FD33F423-8300-4DEC-AF58-B2C3498456B7 (AT) microsoft (DOT) com...
YTD returns a set of Time members.
You need to sum over that set to return a value:

'Sum(YTD(ClosingPeriod(Month, [Time].[1998])))'

HTH,
Brian
www.geocities.com/brianaltmann/olap.html








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.