[CLOSED] How to get CNT.DST total on an Across column Total
I would like to get a distinct count of individuals, SYVSTAL_PIDM, in the across total column. Each of these individuals can have taken more than one of the course or none of the courses that are displayed across the top
TABLE FILE INTHLD
SUM
CNT.DST.INTHLD.SEG01.SYVSTAL_PIDM AS 'Student,Count'
BY INTHLD.SEG01.Major1
BY INTHLD.SEG01.SYVSTAL_CLASS
ACROSS LOWEST INTHLD.SEG01.CRSE AS 'Course' ACROSS-TOTAL
The numbers I get sum across the courses, for example I get BIO120 BIO130 TOTAL Biology SR 42 42 84
When it should be BIO120 BIO130 TOTAL Biology SR 42 42 42
Thanks TrudyThis message has been edited. Last edited by: FP Mod Chuck,
WF8 Windows
January 19, 2018, 01:54 PM
MartinY
Does using the multi-verb may work for you ?
-* multi-verb solution
TABLE FILE CAR
SUM CNT.MODEL AS 'Nb_Model'
BY COUNTRY
SUM CNT.DST.MODEL
BY COUNTRY
ACROSS CAR
END
-* to validate that the above data is ok
TABLE FILE CAR
PRINT MODEL
BY COUNTRY
ACROSS CAR
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
January 19, 2018, 03:34 PM
Trudy
That didn't work for me. I did get it by putting the values in a hold file and then rejoining it to itself. But I was hoping for a more elegant solution!
Thanks Trudy
WF8 Windows
January 19, 2018, 04:20 PM
MartinY
That was going to be my second option.
Glad to see that you solved your issue.
Please edit your first post to add [SOLVED] at the beginning of the subject.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
January 19, 2018, 04:36 PM
Tom Flynn
TABLE FILE CAR
SUM
CNT.MODEL NOPRINT
BY COUNTRY
SUM
CNT.DST.MODEL AS ''
BY COUNTRY
ACROSS CAR
COMPUTE XTOTAL/I5C = C1; AS 'TOTAL'
END
-EXIT