dbTalk Databases Forums  

Rolling Average

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


Discuss Rolling Average in the microsoft.public.sqlserver.olap forum.



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

Default Rolling Average - 02-17-2005 , 10:44 AM






I have to make a Calculated Measure for the Rolling(Moving) Average of the
last 7 Days sales

I have the following formula
AVG(LASTPERIODS(3), [Store Sales] which returns any period rolluup
but i want to calculate only on day not on any period even though i might be
standing on Month,Quartor or any other Level





Reply With Quote
  #2  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: Rolling Average - 02-17-2005 , 11:02 AM






Do you mean it displays null on other level than day? If then, you try IIF()
function.

IIF(Time.CurrentMember.Level.Name = "Day", Avg(....), NULL)

Ohjoo Kown
www.olapforum.com


"Burhan" <burhanuddin.ahmed (AT) gonetbpo (DOT) com> wrote

Quote:
I have to make a Calculated Measure for the Rolling(Moving) Average of
the
last 7 Days sales

I have the following formula
AVG(LASTPERIODS(3), [Store Sales] which returns any period rolluup
but i want to calculate only on day not on any period even though i might
be
standing on Month,Quartor or any other Level







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

Default Re: Rolling Average - 02-21-2005 , 01:43 AM



it does not return null, in fact it displays result on other levels as well
but i myself want it to be calucated on basis of day only even when i am on
quarters or any other level.
Furthermore, can you help me with another problem. i want to cacluate a
metric called acquisition rate whereby i want to know how many new customers
have been acquired in any period, be it day, week, month etc. what would be
right way of doing it and which function should i use for it. i have
inserted all customers record in the fact table.

----- Original Message -----
From: "Ohjoo Kwon" <ojkwon (AT) olap (DOT) co.kr>
Newsgroups: microsoft.public.sqlserver.olap
Sent: Thursday, February 17, 2005 10:02 PM
Subject: Re: Rolling Average


Quote:
Do you mean it displays null on other level than day? If then, you try
IIF()
function.

IIF(Time.CurrentMember.Level.Name = "Day", Avg(....), NULL)

Ohjoo Kown
www.olapforum.com


"Burhan" <burhanuddin.ahmed (AT) gonetbpo (DOT) com> wrote in message
news:O$WCE8QFFHA.2180 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I have to make a Calculated Measure for the Rolling(Moving) Average of
the
last 7 Days sales

I have the following formula
AVG(LASTPERIODS(3), [Store Sales] which returns any period rolluup
but i want to calculate only on day not on any period even though i
might
be
standing on Month,Quartor or any other Level










"Ohjoo Kwon" <ojkwon (AT) olap (DOT) co.kr> wrote

Quote:
Do you mean it displays null on other level than day? If then, you try
IIF()
function.

IIF(Time.CurrentMember.Level.Name = "Day", Avg(....), NULL)

Ohjoo Kown
www.olapforum.com


"Burhan" <burhanuddin.ahmed (AT) gonetbpo (DOT) com> wrote in message
news:O$WCE8QFFHA.2180 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I have to make a Calculated Measure for the Rolling(Moving) Average of
the
last 7 Days sales

I have the following formula
AVG(LASTPERIODS(3), [Store Sales] which returns any period rolluup
but i want to calculate only on day not on any period even though i
might
be
standing on Month,Quartor or any other Level









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.