![]() |
||||||||||||
Go ![]() | New ![]() | Search ![]() | Notify ![]() | Tools ![]() | Reply ![]() | ![]() |
Platinum Member |
I think the report is correct and must give a good answer. The computed field SH will be evaluated only 1 time for each value of FELD2 (due to SUM and BY), and referring to the previously summarized value of FELD1. Example: TABLE FILE CAR SUM COMPUTE VENTAS/I10 = SALES - 20000 ; COMPUTE SH/A1= IF VENTAS GE 0 THEN 'H' ELSE 'D'; AS '' BY COUNTRY END Regards, MikelThis message has been edited. Last edited by: <Mabel>, | |||
|
<Stahl> |
Hi Mikel, the report body is correct, but what is missing is the letter "H" or "S" in the summary line when by sequenzer "FELD2" changes. Alphanumeric fields are not summarized and produce a blank. We want to add the letter "H" or "S" according to value of the summarized value. Regards Stahl | ||
|
Member |
Try this: TABLE FILE CAR SUM COUNTRY CAR SALES IN 30 COMPUTE SH/A1= IF SALES GT 0 THEN 'H' ELSE 'S'; IN +0 AS '' BY COUNTRY NOPRINT BY CAR NOPRINT ON COUNTRY RECAP SSH/A1= IF SALES GT 0 THEN 'H' ELSE 'S'; NOPRINT ON COUNTRY SUBFOOT " " "TOTAL COUNTRY END Regards | |||
|
Platinum Member |
GUNTER is right. You can use RECAP, but also, you must use the calculated field in subfoot in order to avoid automatic FOCUS positioning. TABLE FILE CAR SUM COMPUTE TESTSALES/I9 = SALES - 20000 ; COMPUTE SH/A1= IF TESTSALES GE 0 THEN 'H' ELSE 'S'; AS '' IN +1 BY COUNTRY BY CAR ON COUNTRY RECAP SSH/A1= IF TESTSALES GE 0 THEN 'H' ELSE 'S'; ON COUNTRY UNDER-LINE SUBFOOT " " "TOTAL END Regards, MikelThis message has been edited. Last edited by: <Mabel>, | |||
|
Powered by Social Strata |
![]() | Please Wait. Your request is being processed... |
|