Focal Point
Different Counts

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3171095191

October 18, 2006, 10:17 AM
MadamZuZu
Different Counts
Hi Smiler
I would like to make a report with counts that have different "WHERE" statements. I would like them to be in columns, for example:

column 1    column 2    column 3
where x=1   where x=2   where x=3
...         ...         ...


how can i tell focus to do a "where" on a particular Counter variable?


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode
October 18, 2006, 10:38 AM
Glenda
Try this.

DEFINE FILE FILENAME
COL1/I9 = IF X=1 THEN 1 ELSE 0;
COL2/I9 = IF X=2 THEN 1 ELSE 0;
COL3/I9 = IF X=3 THEN 1 ELSE 0;
END

TABLE FILE FILENAME
COUNT
COL1
COL2
COL3


Glenda

In FOCUS Since 1990
Production 8.2 Windows
October 18, 2006, 11:03 AM
Jim_at_LM
fast way: just DEFINE fields as yournew columns with IF statements controlling what you need in that column:
DEFINE FILE ..
COL1 / I9 = IF .... AND .. THEN COUNTER ELSE 0 ;
COL2 / D12.2 IF ... AND ... THEN DOLLAR ELSE 0;
etc.
END
TABLE FILE ..
SUM COL1 AS 'name1'
COL2 AS '...'

:
END


WebFOCUS 7.6.11, WINDOWS, HTML, PDF, EXCEL
October 18, 2006, 12:33 PM
MadamZuZu
that worked. thanks Smiler


~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~||~~~
PROD: WebFOCUS 7.1.3 on Win 2K/IIS 6/ISAPI Mode/Self-Serve Apps Only (No App Server)
TEST: WebFOCUS 7.1.3 on Win 2K/IIS 6/Weblogic 8.1/Servlet Mode