Home > Archive > MS SQL Server OLAP > September 2005 > average through calculated measure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author average through calculated measure
Sanju via SQLMonster.com

2005-09-27, 3:24 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.
Darren Gosbell

2005-09-27, 8:24 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_do
t_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <54fb09ddc7805@uwe>, u14323@uwe says...
> 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.
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com