on 09-11-2009 9:12 AM
Hi all,
in my model from the data service I obtain these fields
sold_to (T)
delivery_date (D)
quantity (N)
zdiff_date (N)
zindex (N)
I have to present a table where I have a row for each SOLD_TO and in the columns I'd like to show the average values.
So the situation should be:
sold_to | quantity (AVG) | zdiff_date (AVG) | zindex (AVG).
For this I use the Group by operator where on SOLD_TO field I apply the Group1 and for the others fields I use the average operation.
My problem .... I don't see the results..... all the average fields are empty but if I apply the sum (for instance) I obtain the right results.
Where is the problem? Have you ever seen or tested this kind of situation?
Regards, Roberto
Hi
Only Group operator is not sufficient. In your case -
1. If you apply 'Group'1 on 'Sold_To' then you also need to apply 'Total' on the key figure (Say - Quantity). You will get both options in 'Group' operator itself.
2. There is another method you can use filter operator & diplay only result row.
Regards
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Follow the steps to use 'Group Operator' -
1. Right click on the group operator & go to configure element.
2. Select the field which you want to group (where you want total or avg)
3. Got in the next column (Sigma) & select 'Gourp1' for all that fields. Do same for Key & Ext_Key also.
4. Then go to the field which you want to add or you want Avg.
5. Then again go to the 'Sigma column' for that & select operator 'SUM or AVERAGE'
6. Then you will get the required output.
Regards
Sandeep
Hi,
I applied your suggestion but doesn't work for the AVG. Only for the total (SUM).
I have these records in input:
SOLD_TO | DELIVERY_DATE | QTY | DIFF_DAYS | INDEX
0000102004 | 02.01.2008 | 1500 | 7 | 0,00467
0000102004 | 05.02.2008 | 1500 | 91 | 0,06067
0000102004 | 05.29.2008 | 17,010 | 27 | 0,00159
Group By Operator:
SOLD_TO (GROUP1)
DELIVERY_DATE (NONE)
QTY (AVG)
DIFF_DAYS (AVG)
INDEX (AVG OR STDDEV)
The results is
SOLD_TO | QTY | DIFF_DAYS | INDEX
0000102004 | | |
But if apply the following Sigma for the Group by operator
Group By Operator:
SOLD_TO (GROUP1)
DELIVERY_DATE (NONE)
QTY (SUM)
DIFF_DAYS (SUM)
INDEX (SUM)
The results is
SOLD_TO | QTY | DIFF_DAYS | INDEX
0000102004 | 20,010 | 125 | 0,06693
Only with the total it seems to work.
Regards, Roberto
Sandeep,
sorry but the average on Group by doesn't work. If there isn't solution I'll open a message to SAP.
GroupBY operator has GROUP1 for SOLD_TO and DELIVERY_DATE and for the other fields only the SUM I'm able to see.
If I apply the AVG I cannot see the results.
Only a thing when you say: "'Sigma' operator will not work for 'AVERAGES'. So you have to use 'GROUP' operator only.
". Why?
Regards, Roberto
Edited by: Roberto Fattore on Sep 11, 2009 11:45 AM
Hi
Drag one more 'Group Operator'. There select 'GROUP2' for the same field (SOLD_TO) & then apply 'AVERAGE' operator on required 'Field'. When you select 'GROUP1' you can define only one function (Sum or Average) after creating such groups you can use 'Combine Operator' to combine all the groups.
Regards
Sandeep
Hi Sandeep,
I tried to apply your suggestions without results. Probably I didn't apply correctly the operator.
May we start with a simplier example:
FIeld | Value
A | 10
A | 20
B | 5
The result should be:
Field | Value (AVG)
A | 15
B | 5
1) Output of the data service I attach a "Group by" operator: for the "FIELD" the SIGMA is GROUP1 and the "VALUE" the SIGMA is AVG
2) Output of the "GROUP BY" I attach the SIGMA operator: for the "VALUE" I apply AVG.
3) Output of the "SIGMA" I attach the result table ... but here I don't see nothing ... there is only a value for the "FIELD" that is "B"
Where is the error?Regards, Roberto
Hi,
FIeld | Value
A | 10
A | 20
B | 5
The result should be:
Field | Value (AVG)
A | 15
B | 5
If you want the result as in the second table from the data in the first table do the following things.
step1: Connect data service to a "Group By" Operator.
Step2: In the Configuration of "Group By" Select "GROUP1" against Field and AVERAGE against Value.
Step3: Connect the out port of the "Group By" operator to the Table View.
Deploy and run the model, you will the get as in the second table above.
Regards,
Rk.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.