October 18, 2006, 10:17 AM
MadamZuZuDifferent Counts
Hi
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?
October 18, 2006, 10:38 AM
GlendaTry 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
October 18, 2006, 11:03 AM
Jim_at_LMfast 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
October 18, 2006, 12:33 PM
MadamZuZuthat worked. thanks