dbTalk Databases Forums  

Averages

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


Discuss Averages in the microsoft.public.sqlserver.olap forum.



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

Default Averages - 11-16-2006 , 01:59 PM






Columns is a date and the row has a hierarchy of All Orders and Order.
Measure is a Lead Time. If drill down to an order, get the lead time for the
order. But, drill up to "All Orders" for the date, I get the sum of all
orders.

For Example

Order A 10
Order B 20
Order C 15

I get All Orders - 45
What I am trying to achieve is All Orders - 15

How is that done. Set the DataAggregation to "AverageofChildren". But,
doesn't seem to work. Any help would be greatly appreciated.

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Averages - 11-17-2006 , 12:46 AM






"AverageofChildren" will only average over the time dimension, so for
your case you could add a "Count" aggregation measure on the same
measure group like [OrderCount]. Then, if you use "Sum" aggregation for
[Lead Time], [AvgLeadTime] can be computed as: [Lead Time] /
[OrderCount].


- 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.