dbTalk Databases Forums  

Aggregate Function in a stock measure

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


Discuss Aggregate Function in a stock measure in the microsoft.public.sqlserver.olap forum.



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

Default Aggregate Function in a stock measure - 02-05-2004 , 08:29 AM






Suppose I need to show daily stock level in a warehouse. My problem is that
there's no AVERAGE Aggregate Function, instead, I can only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you prevent AS to
aggregate them fro different dates?

Thank you,

Michael



Reply With Quote
  #2  
Old   
Sanka
 
Posts: n/a

Default Aggregate Function in a stock measure - 02-05-2004 , 09:19 AM






You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

Quote:
-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.


Reply With Quote
  #3  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-05-2004 , 09:42 AM



Thank you...

That's exactly what I needed,

Michael

"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
Quote:
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.




Reply With Quote
  #4  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-05-2004 , 10:02 AM



I can not implement it since it tells me that the level MONTH of the DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no matter
there's no new data and the estimated size for the regular time dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing the cube
and the directory in the disk has no more than 5 MB, no matter AS reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
Quote:
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.




Reply With Quote
  #5  
Old   
Tom Chester
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-06-2004 , 05:30 PM



I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote

Quote:
I can not implement it since it tells me that the level MONTH of the DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no matter
there's no new data and the estimated size for the regular time dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing the
cube
and the directory in the disk has no more than 5 MB, no matter AS reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.






Reply With Quote
  #6  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-09-2004 , 09:17 AM



The problem is :

When I check the syntax of the MDX query in the Calculated Member Generator
Window in AS, it states that the following statement can not be generated
since the Member Month is not Unique...

[Measures].[Quantity] /
Count(Descendants([Time].CurrentMember, [Months]))
Suppose Im working with SPanish AS, and the Time dimension was created as
usual.I browsed the dimension in the MDX Sample Application and it shows (In
Spanish) three January months since I'm Including three years in the
analysis.What's wrong?Thank you,Michael
"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:vsVUb.76$an2.53187 (AT) news (DOT) uswest.net...
Quote:
I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:OeShEGA7DHA.2432 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I can not implement it since it tells me that the level MONTH of the
DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont
work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no
matter
there's no new data and the estimated size for the regular time
dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing the
cube
and the directory in the disk has no more than 5 MB, no matter AS
reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.








Reply With Quote
  #7  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-09-2004 , 10:31 AM



Thank you anyway.

I just found a way to solve the issue.

If I use custom rollup formulas, for every level of the dimension "Time" I
do not want to sum for the inventory measure, the problem is gone.

In the inventory cube I define

Avg( Time.CurrentMember.Children )

as the aggregation formula for a custom rollup in that level. Doing so in
Levels Month and Year, I allways get the real inventory in a daily basis but
I get the Average when I show the level Month and the level Year...

Cheers

Michael


"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:vsVUb.76$an2.53187 (AT) news (DOT) uswest.net...
Quote:
I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:OeShEGA7DHA.2432 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I can not implement it since it tells me that the level MONTH of the
DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont
work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no
matter
there's no new data and the estimated size for the regular time
dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing the
cube
and the directory in the disk has no more than 5 MB, no matter AS
reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.








Reply With Quote
  #8  
Old   
Tom Chester
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-09-2004 , 11:42 AM



If you have 3 years in your cube, what's wrong with there being 3 instances
of January?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote

Quote:
The problem is :

When I check the syntax of the MDX query in the Calculated Member
Generator
Window in AS, it states that the following statement can not be generated
since the Member Month is not Unique...

[Measures].[Quantity] /
Count(Descendants([Time].CurrentMember, [Months]))
Suppose Im working with SPanish AS, and the Time dimension was created as
usual.I browsed the dimension in the MDX Sample Application and it shows
(In
Spanish) three January months since I'm Including three years in the
analysis.What's wrong?Thank you,Michael
"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:vsVUb.76$an2.53187 (AT) news (DOT) uswest.net...
I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:OeShEGA7DHA.2432 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I can not implement it since it tells me that the level MONTH of the
DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont
work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no
matter
there's no new data and the estimated size for the regular time
dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing the
cube
and the directory in the disk has no more than 5 MB, no matter AS
reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.










Reply With Quote
  #9  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-09-2004 , 12:39 PM



Just don't know...

It's AS that's pointing the error

"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:5EPVb.75$MI2.31499 (AT) news (DOT) uswest.net...
Quote:
If you have 3 years in your cube, what's wrong with there being 3
instances
of January?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:O1Wib$x7DHA.2628 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
The problem is :

When I check the syntax of the MDX query in the Calculated Member
Generator
Window in AS, it states that the following statement can not be
generated
since the Member Month is not Unique...

[Measures].[Quantity] /
Count(Descendants([Time].CurrentMember, [Months]))
Suppose Im working with SPanish AS, and the Time dimension was created
as
usual.I browsed the dimension in the MDX Sample Application and it shows
(In
Spanish) three January months since I'm Including three years in the
analysis.What's wrong?Thank you,Michael
"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:vsVUb.76$an2.53187 (AT) news (DOT) uswest.net...
I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:OeShEGA7DHA.2432 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I can not implement it since it tells me that the level MONTH of the
DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont
work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no
matter
there's no new data and the estimated size for the regular time
dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing
the
cube
and the directory in the disk has no more than 5 MB, no matter AS
reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.












Reply With Quote
  #10  
Old   
Michael Prendergast
 
Posts: n/a

Default Re: Aggregate Function in a stock measure - 02-09-2004 , 01:14 PM



Let's start all over again.

Definitely, using Custom Rollup functions turns a decent and usable Cube
into a slow and unusable one.

So I'm just where I started.

Anyone knows where can I buy on-line (electronic format) George Spofford's
MDX Solutions Book?

Cheers,

Michael


"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:5EPVb.75$MI2.31499 (AT) news (DOT) uswest.net...
Quote:
If you have 3 years in your cube, what's wrong with there being 3
instances
of January?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:O1Wib$x7DHA.2628 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
The problem is :

When I check the syntax of the MDX query in the Calculated Member
Generator
Window in AS, it states that the following statement can not be
generated
since the Member Month is not Unique...

[Measures].[Quantity] /
Count(Descendants([Time].CurrentMember, [Months]))
Suppose Im working with SPanish AS, and the Time dimension was created
as
usual.I browsed the dimension in the MDX Sample Application and it shows
(In
Spanish) three January months since I'm Including three years in the
analysis.What's wrong?Thank you,Michael
"Tom Chester" <public (AT) NOSPAMtomchester (DOT) net> escribió en el mensaje
news:vsVUb.76$an2.53187 (AT) news (DOT) uswest.net...
I take it that modifying the dimension is not an option?

public @ the domain below
www.tomchester.net

"Michael Prendergast" <mikepre (AT) hotmail (DOT) com> wrote in message
news:OeShEGA7DHA.2432 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I can not implement it since it tells me that the level MONTH of the
DATE
dimension is not Unique.

I tried setting the property Member Keys Unique to true, but it wont
work,
since the months are not unique..

One point, the size of the estimated cube exploded up to 600 MB, no
matter
there's no new data and the estimated size for the regular time
dimension
was about 30 MB...

Let's forget about the size stuff since I checked after processing
the
cube
and the directory in the disk has no more than 5 MB, no matter AS
reports
30+ MB



"Sanka" <loonysan (AT) mailcity (DOT) com> escribió en el mensaje
news:a86e01c3ebfb$76aa8070$a001280a (AT) phx (DOT) gbl...
You can solve this problem using Calculated Members.

Check out this URL.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnolap/html/semiadd2.asp?frame=true

Cheers,
Sanka

-----Original Message-----
Suppose I need to show daily stock level in a warehouse.
My problem is that
there's no AVERAGE Aggregate Function, instead, I can
only select SUM, MAX,
MIN, COUNT and Distinct count.

Knowing that a stock measure is Non Additive, how do you
prevent AS to
aggregate them fro different dates?

Thank you,

Michael


.












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.