adding totals/sub totals to custom tables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

adding totals/sub totals to custom tables

Valerie
How do I add a column total to the following tables?

CTABLES
  /FORMAT EMPTY=BLANK MISSING='.'  /SMISSING VARIABLE
  /VLABELS VARIABLES=cohort q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12
    DISPLAY=DEFAULT
  /TABLE cohort > (q1 [COUNT F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0,
  MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] + q2 [COUNT F40.0, ROWPCT.COUNT
  PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] +
  q3 [COUNT F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1,
  MINIMUM, MAXIMUM, STDDEV F40.2]] + q4 [COUNT F40.0, ROWPCT.COUNT PCT40.1,
  TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] + q5 [COUNT
  F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM,
  MAXIMUM, STDDEV F40.2]] + q6 [COUNT F40.0, ROWPCT.COUNT PCT40.1,
  TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] + q7 [COUNT
  F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM,
  MAXIMUM, STDDEV F40.2]] + q8 [COUNT F40.0, ROWPCT.COUNT PCT40.1,
  TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] + q9 [COUNT
  F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM,
  MAXIMUM, STDDEV F40.2]] + q10 [COUNT F40.0, ROWPCT.COUNT PCT40.1,
  TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]] + q11
  [COUNT F40.0, ROWPCT.COUNT PCT40.1, TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM,
  MAXIMUM, STDDEV F40.2]] + q12 [COUNT F40.0, ROWPCT.COUNT PCT40.1,
  TOTALS[COUNT F40.0, MEAN F40.1, MINIMUM, MAXIMUM, STDDEV F40.2]])
  /CLABELS ROWLABELS=OPPOSITE
  /CATEGORIES VARIABLES=cohort ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CATEGORIES VARIABLES=q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 [1, 2, 3, 4, 5
 , OTHERNM] EMPTY=INCLUDE TOTAL=YES POSITION=BEFORE.
Reply | Threaded
Open this post in threaded view
|

Re: adding totals/sub totals to custom tables

David Marso
Administrator
Suggestion:Nobody is going to take your complicated CTABLES syntax, attempt to simulate appropriate data and then attempt to modify your syntax.  Take the simplest structure similar  to what you want and then play around in the GUI.  Then apply it to your specific problem.

Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"