dbTalk Databases Forums  

creating % growth in MDX

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


Discuss creating % growth in MDX in the microsoft.public.sqlserver.olap forum.



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

Default creating % growth in MDX - 07-02-2003 , 02:22 AM






Hi

I want to create a % growth formula in MDX but do not know
how. Can someone advise me. I need % growth in terms of
year on year and % growth for month-on-month.

Thank you.


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: creating % growth in MDX - 07-02-2003 , 11:09 PM






If you need to apply %growth analysis across multiple measures, then you
can add a Time Series Dimension:

There is a Microsoft support article that explains this, using the
Foodmart 2000 Sales cube:

http://support.microsoft.com/default...;EN-US;q304118
Quote:
INF: How To Perform Time Series Calculations (Q304118)
...
Quote:
Growth for a specific measure can be a calculated measure:
Quote:
With Member [Measures].[Unit Sales Growth]
as 'iif(IsEmpty(([Measures].[Unit Sales],[Time].PrevMember)), NULL,
([Measures].[Unit Sales]-([Measures].[Unit
Sales],[Time].PrevMember))/([Measures].[Unit
Sales],[Time].PrevMember))',
FORMAT_STRING = 'Percent'
Select
{[Measures].[Unit Sales],[Measures].[Unit Sales Growth]} on columns,
Descendants([Time].[1997],[Time].[Month],SELF_AND_BEFORE) on rows
from Sales
Quote:
- Deepak

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


Reply With Quote
  #3  
Old   
SANBAR
 
Posts: n/a

Default Re: creating % growth in MDX - 07-03-2003 , 11:29 AM



Hi freger,

here you have an example of the mdx query with the warehouse cube of the
foodmart 2000.

( ([Time].CurrentMember, [Measures].[Warehouse Sales]) -
([Time].CurrentMember.Lag(1), [Measures].[Warehouse Sales]) ) /
([Time].CurrentMember.Lag(1), [Measures].[Warehouse Sales])

Un saludo,

Enrique Barceló

"freger" <freger79 (AT) hotmail (DOT) com> escribió en el mensaje
news:0d9d01c3406a$a0d0dee0$a101280a (AT) phx (DOT) gbl...
Quote:
Hi

I want to create a % growth formula in MDX but do not know
how. Can someone advise me. I need % growth in terms of
year on year and % growth for month-on-month.

Thank you.




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.