Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     "SUBTOTAL" of Alphanumeric field
Go
New
Search
Notify
Tools
Reply
  
"SUBTOTAL" of Alphanumeric field
 Login/Join
 
<Stahl>
posted
We have a table like this:

TABLE FILE xxx
SUM FELD1
AND COMPUTE SH/A1= IF FELD1 GE 0 THEN 'H' ELSE 'S'; AS ''
BY FELD2 SUMMARIZE
END

Like this, FELD1 is summarized correctly. Additionaly we want to create a 'H' or 'S' behind this sum, regarding whether the value is positive or negative. But SUM won't sum up alphanumeric fields. Is there a possibility to manage this?
We also tried the RECAP-Command, but then the letter 'H' or 'S' is positioned in the next line.

We are using FOCUS7.2

Thanks for any advice!
Stahl
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
<Stahl>
posted
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
 
Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 2 | Location: Germany | Registered: June 04, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
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 <31>"
END
Regards,
Mikel

This message has been edited. Last edited by: <Mabel>,
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     &quot;SUBTOTAL&quot; of Alphanumeric field

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.