Ah, Nevermind. I am blind... and now I see.
Please subscribe to Known Issue
DT215992.
------------------------------
David Dwyer
SPSS Technical Support
IBM Software
------------------------------
Original Message:
Sent: Mon June 05, 2023 01:25 PM
From: David Dwyer
Subject: Hide Columns using SPSS MODIFY TABLES
Hi @Jon Peck
You're going to have to give me more to go on. I ran your syntax example in Statistics 25.0.0.2 and 29.0.1.0 (Windows) as well as 29.0.1.0 (macOS) and I get the same (successful looking) result. I'm not sure what behavior I am filing a defect against since I can't replicate it.
------------------------------
David Dwyer
SPSS Technical Support
IBM Software
------------------------------
Original Message:
Sent: Sat June 03, 2023 05:31 PM
From: Jon Peck
Subject: Hide Columns using SPSS MODIFY TABLES
Thanks for the spv file. There is definitely an SPSS bug here - Dave, please file, but I think I have a workaround.
I could reproduce the problem in 29.0.1. Using employee data.sav, I ran a table with the same structure.
CTABLES
/VLABELS VARIABLES=educ minority jobcat gender DISPLAY=LABEL
/TABLE educ > minority [COUNT F40.0, ROWPCT.VALIDN PCT40.1] BY jobcat > gender
/CATEGORIES VARIABLES=educ minority gender ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE
/CATEGORIES VARIABLES=jobcat ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER
MISSING=EXCLUDE
/CRITERIA CILEVEL=95.
and then the MODIFY TABLES command.
SPSSINC MODIFY TABLES subtype="'Custom Table'" SELECT='Count'
DIMENSION= COLUMNS LEVEL = -1 SIGLEVELS=BOTH
PROCESS = preceding HIDE=TRUE /STYLES APPLYTO=labels.
That failed even with several variations. I found that using the pivot table editor, the OUTPUT MODIFY command, and SPSSINC MODIFY TABLES all produced the same wrong behavior.
However, if I reversed the COUNT and ROWPCT order, I got the correct result. Since the goal here was to hide the count column, that change is harmless. I could export it to Excel, also, and the result was correct. I only tried this on that one table.
--
Original Message:
Sent: 6/3/2023 3:38:00 AM
From: Wael Kassem
Subject: RE: Hide Columns using SPSS MODIFY TABLES
Using Statistics v25.
I sent the spv file to your email
------------------------------
Wael Kassem
Original Message:
Sent: Fri June 02, 2023 06:39 PM
From: Jon Peck
Subject: Hide Columns using SPSS MODIFY TABLES
If you can send me an spv file containing the table, I'll figure this out (
jkpeck@gmail.com). Also, what version of Statistics are you using?
--
Original Message:
Sent: 6/2/2023 6:34:00 PM
From: David Dwyer
Subject: RE: Hide Columns using SPSS MODIFY TABLES
Hi @Wael Kassem
I'm not sure what to tell you. The example table you gave has preceding totals in the Rows and Columns. The command syntax you gave does not create preceding totals.
/CATEGORIES VARIABLES= <your variable list> !onevar ORDER=A KEY=VALUE EMPTY=EXCLUDE Total=NO POSITION=After
What else is different about your replication scenario?
In answer to your second question... Yes, simply change the label in your CTABLES command syntax:
/TABLE (<Long list of stacked variables>) [COUNT F40.0, ROWPCT.VALIDN PCT40.1] by !onevar [C]
becomes
/TABLE (<Long list of stacked variables>) [COUNT F40.0, ROWPCT.VALIDN ' Percent' PCT40.1] by !onevar [C]
You seem to be on the right track. Here is an example that creates its own data and runs your command syntax as you indicated you wanted it. It then runs SPSSINC MODIFY TABLES.
------------------------------
David Dwyer
SPSS Technical Support
IBM Software