Ctable with MRSETS

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

Ctable with MRSETS

jagadishpchary
HI,

I am using the below syntax and running a table. however the question is,
when i run the below syntax the order of the attributes in the table are not
displayed in the specified order. I need the same order as specified in the
MRSETs i.e. Q6r1 TO Q6r10. I also tried different option in the /CATEGORIES
VARIABLES like KEY=value ..etc. however the order is distrubed. Can anyone
please help me with the syntax.

MRSETS /MDGROUP NAME=$Q6 LABEL="Q6. Brand you would like to use"
CATEGORYLABELS=COUNTEDVALUES VARIABLES=Q6r1 TO Q6r10 VALUE=1 /DISPLAY
NAME=[$Q6].

CTABLES
/VLABELS VARIABLES = $Q6,TOTAL DISPLAY=none
/TABLE $Q6 [count] by TOTAL+temp1+temp2+temp3+temp4
/SLABELS POSITION=COLUMN VISIBLE=No
/CATEGORIES VARIABLES=$Q6 ORDER=A KEY=label TOTAL=Yes POSITION=BEFORE  Label
= "Total"
/COMPARETEST TYPE=PROP ALPHA=.05
/TITLES TITLE=')TABLE'.

Just to illustrate, I want the table to be generated in the below order

                      TOTAL
                 
Q6r1 - Att1        12
Q6r2 - Att2        23
Q6r3 - Att3        45
.
.
.
.

Q6r8- Att8         12
Q6r9 - Att9        76
Q6r10 - Att10    43

Regards,
Jagadish




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Ctable with MRSETS

Jon Peck
Your CATEGORIES syntax specifies ascending order.  If you  remove the ORDER keyword, the values will be in the order defined in the MD set.  You can also specify the order explicitly by listing the variable names, e.g.
/categories variables=$Q6 [q6r1 q6r2 ...]

On Fri, Apr 24, 2020 at 6:46 AM jagadishpchary <[hidden email]> wrote:
HI,

I am using the below syntax and running a table. however the question is,
when i run the below syntax the order of the attributes in the table are not
displayed in the specified order. I need the same order as specified in the
MRSETs i.e. Q6r1 TO Q6r10. I also tried different option in the /CATEGORIES
VARIABLES like KEY=value ..etc. however the order is distrubed. Can anyone
please help me with the syntax.

MRSETS /MDGROUP NAME=$Q6 LABEL="Q6. Brand you would like to use"
CATEGORYLABELS=COUNTEDVALUES VARIABLES=Q6r1 TO Q6r10 VALUE=1 /DISPLAY
NAME=[$Q6].

CTABLES
/VLABELS VARIABLES = $Q6,TOTAL DISPLAY=none
/TABLE $Q6 [count] by TOTAL+temp1+temp2+temp3+temp4
/SLABELS POSITION=COLUMN VISIBLE=No
/CATEGORIES VARIABLES=$Q6 ORDER=A KEY=label TOTAL=Yes POSITION=BEFORE  Label
= "Total"
/COMPARETEST TYPE=PROP ALPHA=.05
/TITLES TITLE=')TABLE'.

Just to illustrate, I want the table to be generated in the below order

                      TOTAL

Q6r1 - Att1        12
Q6r2 - Att2        23
Q6r3 - Att3        45
.
.
.
.

Q6r8- Att8         12
Q6r9 - Att9        76
Q6r10 - Att10    43

Regards,
Jagadish




--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Ctable with MRSETS

jagadishpchary
Thanks Jon ..it worked.



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD