dbTalk Databases Forums  

rolling time display

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


Discuss rolling time display in the microsoft.public.sqlserver.olap forum.



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

Default rolling time display - 11-05-2003 , 04:24 PM







Attempting to write MDX select statement that displays last 12 months
that have data in them. Here is what I have so far:



select

tail(Filter({[Period].Month.Members},(NOT
IsEmpty([Measures].CurrentMember))),12) on columns,

{Measures.[Enroll Cnt]} ON ROWS

from Enrollment



I need to limit this to current year ([Period].[2003]. It is pulling
all the months from all the years in the cube now, so I can't tell if
the filter works since I do have an enroll cnt for all months over time.
I don't have an Enroll Cnt for December 2003, so my retrieval should
show December (2002) thru November (2003).


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
priya
 
Posts: n/a

Default rolling time display - 11-05-2003 , 05:37 PM






Doesn't [Period].[2003].[Month] within the filter help?
Am I missing something?
- Priya

Quote:
-----Original Message-----

Attempting to write MDX select statement that displays
last 12 months
that have data in them. Here is what I have so far:



select

tail(Filter({[Period].Month.Members},(NOT
IsEmpty([Measures].CurrentMember))),12) on columns,

{Measures.[Enroll Cnt]} ON ROWS

from Enrollment



I need to limit this to current year ([Period].[2003].
It is pulling
all the months from all the years in the cube now, so I
can't tell if
the filter works since I do have an enroll cnt for all
months over time.
I don't have an Enroll Cnt for December 2003, so my
retrieval should
show December (2002) thru November (2003).


--
Posted via http://dbforums.com
.


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

Default Re: rolling time display - 11-06-2003 , 09:00 AM




I kept getting errors when I added that member. Actually, what I really
want to do is this:





select

LastPeriods(12, [Period].[All Period].[2003].[Quarter 4].[November])
on columns

from Enrollment

where [Scenario].[All Scenario].[Actual]





This is similar to how we are currently doing it in an Essbase cube.
However, we are passing in the current month with an Essbase
substitution variable so it is dynamic on the display. How would I
simulate that in Analysis Services?


--
Posted via http://dbforums.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.