dbTalk Databases Forums  

My query is this

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


Discuss My query is this in the microsoft.public.sqlserver.olap forum.



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

Default My query is this - 04-07-2004 , 10:07 AM






Hi actually my query is below:
member
[MEasures].[Last7days] as 'sum(lastperiods(7,[newtime].
[All newtime].[1997].[December].[4]),([Measures].[Count]))'
member
[MEasures].[Last30days] as 'sum(lastperiods(30,[newtime].
[All newtime].[1997].[December].[4]),([Measures].[Count]))'
member
[MEasures].[Last180days] as 'sum(lastperiods(180,[newtime].
[All newtime].[1997].[December].[4]),([Measures].[Count]))'
member
[MEasures].[Last365days] as 'sum(lastperiods(365,[newtime].
[All newtime].[1997].[December].[4]),([Measures].[Count]))'
select
{[Measures].[Last7days],[Measures].[Last30days],
[Measures].[Last180days],[Measures].[Last365days]} on
columns,
{Product.members} on rows
from Sales

The abv query is executing correct..But I want the
date in lasperiods should be dynamic..It should take
automatcially as recent date from the entered data(from
table)..
If i give:
[newtime].[all newtime].lastchild.lag(7)..It is giving the
blank data...Actually my cube contains upto 31 dec 1998
data..so from that date The query will take for last
7,30,90,.. days..what is the correct syntax???


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.