dbTalk Databases Forums  

MDX: PeriodsToDate(), etc..

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


Discuss MDX: PeriodsToDate(), etc.. in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fieldian@gmail.com
 
Posts: n/a

Default MDX: PeriodsToDate(), etc.. - 11-18-2005 , 12:49 PM






Hi All,

I'm trying to write a formula (actually, four) which will be used in
Panorama NovaView to allow a user to see Revenue (on rows) by Previous
Month (Current Year), Previous Month (Previous Year), Current YTD
(ending at month in question), Previous YTD (ending at month in
question) (on columns -- not necessarily in that order).

Basically, when run anytime during November 2005, the output would look
like:

2004 Total | Oct 2004 | 2005 Total | Oct 2005
$ 100,000 | 15,000 | 120,000 | 17,500

The Dimension I'm working with is [Calendar Year], with levels: (All),
[Calendar Year], [Calendar Month], [Calendar Week].

I've been focusing on the formula for the first column, since it is the
most complex (I think). Here's the jist of what I am trying to do:

SELECT Measures.Revenue ON ROWS,
<<Last Year>>.January : <<Last Year>>.<<LastMonth>> ON COLUMNS
FROM SalesCube

I believe some combination of PeriodsToDate(), LastPeriod() and/or
<<Current Year>>.PrevMember & <<Current Month>>.PrevMember is what I
need, but I just can't get the syntax right.

Any help would be appreciated.

Thanks,
Ian Field


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.