dbTalk Databases Forums  

4 Week average not working if filtered

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


Discuss 4 Week average not working if filtered in the microsoft.public.sqlserver.olap forum.



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

Default 4 Week average not working if filtered - 12-21-2005 , 02:35 PM






A calculated member was created to get the 4 week average. This works with
the following exceptions:
1. Looking at a full year (week 1-52), the first 3 records returned are
never correct.
1 = null
2 = average of row 1
3 = average of row 1-2
4 = average of row 1-3
*5 = average of row 1-4
Row 5 + return correct values

What I’m looking to do is base my query week 6-20 but only return weeks
10-20. By doing this, I’m assuming, my 4 week average will display correctly.

Initial Revenue 4 Week Average
36 100 x
37 100 x
38 100 x
39 100 x
40 100 4
41 200 400
42 300 500
43 400 700
44 500 1000
45 600 1400
46 700 1800
47 800 2200
48 900 2600
49 1000 3000
50 1100 3400
51 1200 3800
52 1300 4200


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.