Home > Archive > MS SQL Data Warehousing > March 2005 > Help with measure aggregation functions









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 Help with measure aggregation functions
MPS

2005-03-30, 9:40 am

Hi, I will rewrite my question.

I'm having trouble to show averages of a measure in a cube, where the normal
aggregation function for a measure is SUM.

I see no AVG aggregation function for measures (I see Min, Max, Count,
Distinct Count and SUM).

If I hide the measure (cost), and create a calculated member based on that
measure, ie Avg(cost), I have te problem of how to average it, since the
cube has two dimensions in the row axis, like:

Time
---------------------------------------
Product |
Customer | avg of cost

If I use avg(nonemptycrossjoi
n(product.currentmember.children,
customer.currentmember.children), measures.cost) I get the same average for
every cell in the cube, what's not corrrect...

Sorry to bother you all, but this thing is becoming a nightmare.

Hope you can help

Michael Prendergast



OLAPMonkey

2005-03-30, 7:03 pm

Averages are usually handled by summing and counting...and then
dividing the sub by the count in a calculated member.

MPS wrote:
> Hi, I will rewrite my question.
>
> I'm having trouble to show averages of a measure in a cube, where the

normal
> aggregation function for a measure is SUM.
>
> I see no AVG aggregation function for measures (I see Min, Max,

Count,
> Distinct Count and SUM).
>
> If I hide the measure (cost), and create a calculated member based on

that
> measure, ie Avg(cost), I have te problem of how to average it, since

the
> cube has two dimensions in the row axis, like:
>
> Time
> ---------------------------------------
> Product |
> Customer | avg of cost
>
> If I use avg(nonemptycrossjoi
n(product.currentmember.children,
> customer.currentmember.children), measures.cost) I get the same

average for
> every cell in the cube, what's not corrrect...
>
> Sorry to bother you all, but this thing is becoming a nightmare.
>
> Hope you can help
>
> Michael Prendergast


MPS

2005-03-30, 7:03 pm

Sometimes, getting back to basics gets the job done :)

Thank yo very much, problem solved

Michael


"OLAPMonkey" <jjanke@spss.com> escribió en el mensaje
news:1112202692.231562.128020@g14g2000cwa.googlegroups.com...
> Averages are usually handled by summing and counting...and then
> dividing the sub by the count in a calculated member.
>
> MPS wrote:
> normal
> Count,
> that
> the
> average for
>
>




Sponsored Links





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

Copyright 2009 droptable.com