dbTalk Databases Forums  

MDX: A specific period previous year

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


Discuss MDX: A specific period previous year in the microsoft.public.sqlserver.olap forum.



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

Default MDX: A specific period previous year - 06-16-2004 , 09:19 AM






Hello,

I want to create a Calculated Measure that retrieves values for a
fixed period previous year, this should be independent on which period
I have selected in the time dimension. E.g. Calculated Measure N112
should always retrieve values for December previous year. If period
0302 is selected, values for 0212 should be retrieved, 0303 should
still retrieve 0212, etc. Selected period 0401 should retrieve values
for period 0312.

I have tried parallelperiod, prevmember, lead, lag etc, but nothing
seems to work. Please advice!

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

Default RE: MDX: A specific period previous year - 06-16-2004 , 10:07 AM






This Foodmart Query might help:

with member measures.[FixedPeriod] as '(closingperiod(Month,ancestor(time.currentmember, year).prevmember),[unit sales])'
select {[unit sales],[fixedperiod]} on columns,
month.members on rows
from sales

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


"Rickard" wrote:

Quote:
Hello,

I want to create a Calculated Measure that retrieves values for a
fixed period previous year, this should be independent on which period
I have selected in the time dimension. E.g. Calculated Measure N112
should always retrieve values for December previous year. If period
0302 is selected, values for 0212 should be retrieved, 0303 should
still retrieve 0212, etc. Selected period 0401 should retrieve values
for period 0312.

I have tried parallelperiod, prevmember, lead, lag etc, but nothing
seems to work. Please advice!


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.