Hello, How can I calculate Col % based on SUM? This is the syntax I used: CTABLES /TABLE
PL1_vol [SUM, COLPCT.SUM PCT40.1] + Dole1_vol [SUM, COLPCT.SUM PCT40.1] + AO1_vol [SUM,COLPCT.SUM PCT40.1] BY PL_buyer [C] . This is what I got from running the syntax:
PL_Buyer SUM COL SUM % PL1_vol 30 100% Dole1_vol 40 100%
AO1_vol 30 100% This is what I am looking for. Notice the Col Sum % sums to 100%. PL_Buyer
SUM COL SUM % PL1_vol 30 30% Dole1_vol 40 40% AO1_vol 30 30%
Thanks! Ketty |
Look at the PCOMPUTE subcommand in CTABLES.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Ketty Tanizar Noonan <[hidden email]> To: [hidden email], Date: 10/09/2013 02:23 PM Subject: [SPSSX-L] Custom table: Column % based on SUM Sent by: "SPSSX(r) Discussion" <[hidden email]> Hello, How can I calculate Col % based on SUM? This is the syntax I used: CTABLES /TABLE PL1_vol [SUM, COLPCT.SUM PCT40.1] + Dole1_vol [SUM, COLPCT.SUM PCT40.1] + AO1_vol [SUM,COLPCT.SUM PCT40.1] BY PL_buyer [C] . This is what I got from running the syntax: PL_Buyer SUM COL SUM % PL1_vol 30 100% Dole1_vol 40 100% AO1_vol 30 100% This is what I am looking for. Notice the Col Sum % sums to 100%. PL_Buyer SUM COL SUM % PL1_vol 30 30% Dole1_vol 40 40% AO1_vol 30 30% Thanks! Ketty |
Hola! Espero esto te sirva. Saludos /* Esto es lo que tienes que hacer. VARSTOCASES /ID=id
/MAKE DATA FROM PL1_vol Dole1_vol AO1_vol /INDEX=indicador(DATA) /KEEP=PL_buyer /NULL=KEEP. CTABLES /TABLE DATA [SUM, ROWPCT.SUM PCT40.1]
BY indicador [C]. CTABLES /TABLE indicador > DATA [SUM, COLPCT.SUM PCT40.1]. Javier Figueroa Procesamiento de datos
Independiente 2013/10/9 Jon K Peck <[hidden email]> Look at the PCOMPUTE subcommand in CTABLES. Javier Figueroa Procesamiento y Análisis de bases de datos |
In reply to this post by Jon K Peck
How PCOMPUTE Command will help because I have gone thru the PCOMPUTE command and it creates new variable. From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon K Peck Look at the PCOMPUTE subcommand in CTABLES.
http://www.imrbint.com/disclaimer.html |
Free forum by Nabble | Edit this page |