BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
dipand
Quartz | Level 8

I have an output proc tabulate SAS (in attached an example), my customers want that I change all values lower than a specific,value in my case all value lower than 3 to frequency with a generic symbol(e.s '*') also values sum and average.

In addition, if there is only one asterisk-marked value in the column (before the subtotal), you must also add an asterisk to the lowest value after 3 (excluding 0). Finally, if the column contains many values equal to 1 and the total can be attributed to them, you must also mask another value in that case; specifically, the lowest one.

Someone can help me?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I agree with @andreas_lds . Take the output data set from PROC TABULATE (which you have named WANT) and manipulate it in a DATA step to create text strings that hide the information, as you explained in your original post.

--
Paige Miller

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Many of us refuse to download and open Excel (or other microsoft office) files because they are a security threat. Please show us a screen capture. Please use the "Insert Photos" icon to include your screen capture in your reply; do not attach files.

 

Also please show us the code that produced this output. Please paste the code as text into the box that opens when you click on the "little running man" icon. Do not attach files.

 

--
Paige Miller
dipand
Quartz | Level 8

Hi,

this is an example : 

dipand_0-1697710534883.png

 

 

andreas_lds
Jade | Level 19

Applying secrecy rules in proc tabulate is hardly possible. You will have to post-process the results with a data step, setting all values you want to be replaced to missing (or a special missing value). In another output proc you use a custom format displaying the special missing value as *.

dipand
Quartz | Level 8

 Un example:

dipand_0-1697711820414.png

 

How it's is possible to realize this result in SAS?

PaigeMiller
Diamond | Level 26

Repeating: Also please show us the code that produced this output. Please paste the code as text into the box that opens when you click on the "little running man" icon. Do not attach files.

--
Paige Miller
dipand
Quartz | Level 8
proc tabulate data =Display_UPF  out=want format = commax20.  MISSING  NOSEPS;
Class cod_sez reg / preloadfmt order=formatted; 
var 
	RU_05_01_L1_6939
	RU_05_02_L1_6940
	RU_05_03_L1_6938
;

 

table (cod_sez="" *(reg="" all="Totale"))all="Totale" , n='Numero soggetti' (
    RU_05_01_L1_6939
	RU_05_02_L1_6940
	RU_05_03_L1_6938

)*(N  SUM  MEAN*f=commax20.2) / MISSTEXT='0' PRINTMISS Box="CODICE SEZIONE  REGIONE ";
format cod_sez  &formato1.   reg  &formato2. ;
title "DISTRIBUZIONE PER SEZIONE ATTIVITA' E REGIONE DEI CREDITI D'IMPOSTA";
footnote "Importi espressi in euro";
keylabel N="Frequenza" SUM = "Ammontare" Mean="Media"; 
run;
PaigeMiller
Diamond | Level 26

I agree with @andreas_lds . Take the output data set from PROC TABULATE (which you have named WANT) and manipulate it in a DATA step to create text strings that hide the information, as you explained in your original post.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 761 views
  • 0 likes
  • 3 in conversation