Output Modify Selectcondition

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

Output Modify Selectcondition

Dan Conlon
Hi All:

I'm new to OUTPUT MODIFY and am fairly close on this task  - but need a
tweak.   I want to execute
OUTPUT MODIFY based on 2 conditions - but can't quite get there. My syntax
is:

CTABLES
 /VLABELS VARIABLES= PRVDR_COUNTY_CODE  BILLNAMENPI  PICS  CYEAR  
MBR_COUNTY_CODE  dISPLAY=none
/VLABELS VARIABLES=  SERVTYPE dISPLAY=LABEL
  /MRSETS COUNTDUPLICATES=YES
/FORMAT  MAXCOLWIDTH= 90   MINCOLWIDTH= 70   UNITS=POINTS  EMPTY= BLANK
MISSING= '.'
  /TABLE PRVDR_COUNTY_CODE   [C]>   BILLNAMENPI   [C]   >   MBR_COUNTY_CODE
[C]   >   (PICs [S][SUM,'',comma6.0]  )  
BY SERVTYPE [C]  > Cyear[C]
 /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
  /SLABELS POSITION=COLUMN.
OUTPUT MODIFY
  /SELECT TABLES
  /IF SUBTYPES = ['Custom Table']
  /TABLECELLS SELECT = [ position (1,2,3,4,5,6,7,8,9,10,11,12) ]      
  SELECTDIMENSION=COLUMNS
  SELECTCONDITION=   ["x <= 5"]
    APPLYTO=cell STYLE= REGULAR  ITALIC   TEXTCOLOR=RED    REPLACE='   NA'
FONTSIZE = 10.

The above works correctly (although it may have room for improvement).

However, what I really want is something like         SELECTCONDITION=   ["x
>= 1 and x <= 5"] .  
I can't get the correct syntax for that condition.

What I'm attempting, which I'm sure others have done as well, is trying to
hide small numbers in a table (for privacy/confidentiality reasons).  Any
other suggestions for achieving that are welcome.

Thanks in advance for any help,
Dan




--
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: Output Modify Selectcondition

Dan Conlon
For those interested, I received a couple offline responses that helped
provide a solution.  Thanks very much to Jon Peck and Mario Giesel for your
suggestions.

The key was tweaking the syntax I used for my conditions (where I wanted to
hide CTABLES cells that had small number values between 1 and 5).   The
proper syntax (pretty simple  - but I was slightly off on my initial
attempt) is  "0 <  x <  5".

I also learned that both  SPSSINC MODIFY TABLES and  OUTPUT MODIFY  can be
used for this task.

Jon suggested   SPSSINC MODIFY TABLES.  My final syntax was:
SPSSINC MODIFY TABLES subtype="Custom Table"
select =  "<<ALL>>"
/STYLES  APPLYTO=  "0 <  x <  5"
TEXTCOLOR=  224 224 224
BACKGROUNDCOLOR=224 224 224.
Jon also built a custom function (not shown here) that can be used to
replace the numbers within the appropriate cells with any text that you
choose.

Mario correctly suggested  OUTPUT MODIFY should work for this task if the
condition syntax was modified.  My final syntax was:
OUTPUT MODIFY
  /SELECT TABLES
  /IF SUBTYPES = ['Custom Table']
  /TABLECELLS SELECT = [ position (1,2,3,4,5,6,7,8,9,10,11,12) ]      
  SELECTDIMENSION=COLUMNS
    SELECTCONDITION=   "0 <  x <  5"
   APPLYTO=cell STYLE= REGULAR  ITALIC   TEXTCOLOR=RED    REPLACE='   NA'
FONTSIZE = 10.


Thanks again,
Dan



--
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