dbTalk Databases Forums  

Semi Additive Measure help - newbie

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


Discuss Semi Additive Measure help - newbie in the microsoft.public.sqlserver.olap forum.



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

Default Semi Additive Measure help - newbie - 12-07-2004 , 05:51 AM






Hi all,

I have a fact table with columns:

Order Number OrderLine ProductCode PrgDisc Discount Quantity
001 1 ABC 1
3% 100
001 1 ABC 2
5% 100
001 2 XYZ 1
3% 200
001 2 XYZ 2
8% 200
002 1 ABC 1
3% 300
002 1 ABC 2
5% 300
002 1 ABC 3
2% 300
002 2 HHH 1
5% 150

For each order line I have many records, one for each distinct discount
applied.

I need dimensions ProductCode and Discount. The measure is obviously
quantity.

I can't sum quantity with simple aggregation by product code.

Can anyone help me?

Thanks,

Enrica



Reply With Quote
  #2  
Old   
James Ma
 
Posts: n/a

Default RE: Semi Additive Measure help - newbie - 12-08-2004 , 05:49 PM






Please clarify why you need to sum the %. Normally that doesn't make sense.
Also, you can pick max or min as aggregation function. But I will still doubt
the semantics.

James

"Enrica" wrote:

Quote:
Hi all,

I have a fact table with columns:

Order Number OrderLine ProductCode PrgDisc Discount Quantity
001 1 ABC 1
3% 100
001 1 ABC 2
5% 100
001 2 XYZ 1
3% 200
001 2 XYZ 2
8% 200
002 1 ABC 1
3% 300
002 1 ABC 2
5% 300
002 1 ABC 3
2% 300
002 2 HHH 1
5% 150

For each order line I have many records, one for each distinct discount
applied.

I need dimensions ProductCode and Discount. The measure is obviously
quantity.

I can't sum quantity with simple aggregation by product code.

Can anyone help me?

Thanks,

Enrica




Reply With Quote
  #3  
Old   
Enrica
 
Posts: n/a

Default Re: Semi Additive Measure help - newbie - 12-13-2004 , 04:20 AM



Discount is a dimension, I don't need to sum %, I need to sum quantity sold
with same discount ('3%', '5%' etc are used as discount codes).
The standard aggregation with dimension discount works fine. My problem is
the aggregation with dimension Product, or other dimensions I'll add to the
cube (customer, employee who process order....)


"James Ma" <JamesMa (AT) discussions (DOT) microsoft.com> ha scritto nel messaggio
news:C76D86E0-47E4-4B62-BC80-04E07652B03B (AT) microsoft (DOT) com...
Quote:
Please clarify why you need to sum the %. Normally that doesn't make
sense.
Also, you can pick max or min as aggregation function. But I will still
doubt
the semantics.

James

"Enrica" wrote:

Hi all,

I have a fact table with columns:

Order Number OrderLine ProductCode PrgDisc Discount
Quantity
001 1 ABC 1
3% 100
001 1 ABC 2
5% 100
001 2 XYZ 1
3% 200
001 2 XYZ 2
8% 200
002 1 ABC 1
3% 300
002 1 ABC 2
5% 300
002 1 ABC 3
2% 300
002 2 HHH 1
5% 150

For each order line I have many records, one for each distinct discount
applied.

I need dimensions ProductCode and Discount. The measure is obviously
quantity.

I can't sum quantity with simple aggregation by product code.

Can anyone help me?

Thanks,

Enrica






Reply With Quote
  #4  
Old   
luminary
 
Posts: n/a

Default Re: Semi Additive Measure help - newbie - 12-13-2004 , 11:35 AM



It sounds like the discount is a dimension. If you have discrete discount
values(ie a relatively small number of actual discounts - rather than a
continiously variable values) then you can model discount as a dimension
quite simply.

Alternatively if discount is continiously variable, you might want to model
ranges (0-3,3-5,5-10...)

hth

DG

"Enrica" wrote:

Quote:
Discount is a dimension, I don't need to sum %, I need to sum quantity sold
with same discount ('3%', '5%' etc are used as discount codes).
The standard aggregation with dimension discount works fine. My problem is
the aggregation with dimension Product, or other dimensions I'll add to the
cube (customer, employee who process order....)


"James Ma" <JamesMa (AT) discussions (DOT) microsoft.com> ha scritto nel messaggio
news:C76D86E0-47E4-4B62-BC80-04E07652B03B (AT) microsoft (DOT) com...
Please clarify why you need to sum the %. Normally that doesn't make
sense.
Also, you can pick max or min as aggregation function. But I will still
doubt
the semantics.

James

"Enrica" wrote:

Hi all,

I have a fact table with columns:

Order Number OrderLine ProductCode PrgDisc Discount
Quantity
001 1 ABC 1
3% 100
001 1 ABC 2
5% 100
001 2 XYZ 1
3% 200
001 2 XYZ 2
8% 200
002 1 ABC 1
3% 300
002 1 ABC 2
5% 300
002 1 ABC 3
2% 300
002 2 HHH 1
5% 150

For each order line I have many records, one for each distinct discount
applied.

I need dimensions ProductCode and Discount. The measure is obviously
quantity.

I can't sum quantity with simple aggregation by product code.

Can anyone help me?

Thanks,

Enrica







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.