dbTalk Databases Forums  

average through calculated measure

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


Discuss average through calculated measure in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanju via SQLMonster.com
 
Posts: n/a

Default average through calculated measure - 09-27-2005 , 02:38 AM






I want to create a calculated measure for average of any field of fact table.
How should I do that ???

As per formula, i need to put set and numeric value in that formula. Suppose
I want to see average of 'Sales' (field of fact table) for any combination of
dimensions then what set i should give.

Pls. advise anyone.

Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: average through calculated measure - 09-27-2005 , 07:28 PM






Probably the easiest way to create a generic average that works for any
combination is to add a "Sales Count" measure, which counts the number
of sales. The average measure is simply:

[Measures].[Sales] / [Measures].[Sales Count]

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <54fb09ddc7805@uwe>, u14323@uwe says...
Quote:
I want to create a calculated measure for average of any field of fact table.
How should I do that ???

As per formula, i need to put set and numeric value in that formula. Suppose
I want to see average of 'Sales' (field of fact table) for any combination of
dimensions then what set i should give.

Pls. advise anyone.



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.