The usual crosstabulation table in spss looks like this:
Variable 2
category A
Counts Percentage
Variable 1 category1 value1 per1
category2 value2 per2
How do I do it in spss such that the table will look like this? Is this possible using some syntax?
Variable 2
category A
Variable 1 category1 Counts value1
Percentage per1
category2 Counts value2
Percentage per2
I'm not sure if the CROSSTAB command does produce the table as you indicate?
Using the Employee Data.sav data shipped with SPSS and the below example
GET FILE="C:\PROGRAM FILES\IBM\SPSS\STATISTICS\24\SAMPLES\ENGLISH\EMPLOYEE DATA.SAV".
CROSSTABS
/TABLES=gender BY minority
/FORMAT=AVALUE TABLES
/CELLS=COUNT ROW
/COUNT ROUND CELL.
I get the below, which looks like it is in your desired format?

Alternatively, if you have access to SPSS add-on module CUSTOM TABLES then there is great deal of flexibility to change table structures.
Using CUSTOM TABLES you can use the /SLABELS POSITION={ROW|COLUMN} subcommand to specify how you would like statistics to be presented:
CTABLES
/TABLE gender [COUNT F40.0 COLPCT.COUNT] BY minority
/SLABELS POSITION=ROW.
The equivalent can be found in the CUSTOM TABLE GUI also:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With