dbTalk Databases Forums  

sum of sales of the last 12 periods june 1997 / june 1998 in mdx

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


Discuss sum of sales of the last 12 periods june 1997 / june 1998 in mdx in the microsoft.public.sqlserver.olap forum.



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

Default sum of sales of the last 12 periods june 1997 / june 1998 in mdx - 12-27-2005 , 08:05 AM






Hi,

What is the mdx code to show a sum of sales in foodmart 2000 of the
last 12 periods starting june 1997 / june 1998 while june 1998 is
choosen as reporting date ?

With this formula you see only the months this year:
SUM(YTD([Time]),[Measures].[Sales])

Regards, Marco


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: sum of sales of the last 12 periods june 1997 / june 1998 in mdx - 12-27-2005 , 08:13 AM






try the lastperiods function
sum(lastperiods(12), measures.sales)

"Marco" <olap (AT) gmsbv (DOT) nl> wrote

Quote:
Hi,

What is the mdx code to show a sum of sales in foodmart 2000 of the
last 12 periods starting june 1997 / june 1998 while june 1998 is
choosen as reporting date ?

With this formula you see only the months this year:
SUM(YTD([Time]),[Measures].[Sales])

Regards, Marco




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.