![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |