dbTalk Databases Forums  

Re: Working with Lead / Lag or TIME dimension functions help!!!

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


Discuss Re: Working with Lead / Lag or TIME dimension functions help!!! in the microsoft.public.sqlserver.olap forum.



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

Default Re: Working with Lead / Lag or TIME dimension functions help!!! - 02-16-2005 , 05:32 PM






Depending on whether you wish to analyze just one measure or many, you
can either set up calculated measures or a time-analysis dimension. A
calculated measure might be:

Quote:
With Member [Measures].[QuarterlySalesChange] as
'[Measures].[Unit Sales] - ([Measures].[Unit Sales],
ParallelPeriod([Time].[Quarter]))'

Select {[Measures].[Unit Sales],
[Measures].[QuarterlySalesChange]} on columns,
[Time].[Month].Members on rows
from Sales
Quote:

A KB article shows how to create analytical dimensions:

http://support.microsoft.com/default...;EN-US;q304118
Quote:
INF: How To Perform Time Series Calculations
Article ID : 304118
Last Review : July 15, 2004
Revision : 1.0
This article was previously published under Q304118

SUMMARY
Time series calculations are frequently required in business and
financial reports. Multidimensional expressions (MDX) provide the
following time oriented functions to perform time series calculations: •
YTD
• QTD
• MTD
• WTD
• LastPeriods
• PeriodsToDate
This article describes how to use the functions in the preceding list to
provide year-to-date, quarter-to-date, month-to-date, and 12 month
moving total calculations.
...
Quote:

And here is a link to download such a sample:

http://www.tomchester.net/articlesdo...dimension.html


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.