dbTalk Databases Forums  

Re: MDX: How to return the last 10 days sales from today?

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


Discuss Re: MDX: How to return the last 10 days sales from today? in the microsoft.public.sqlserver.olap forum.



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

Default Re: MDX: How to return the last 10 days sales from today? - 08-25-2005 , 09:19 PM






Depending on the naming of your day members, you can construct a string
that represents today's date (using VBA functions like Date and Format
as necessary). Then, you can convert the string to a day member, and
take 10 previous:

LastPeriods(10, StrToMember("TodayString").PrevMember)


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

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.