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
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.
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.
Hi,
this is an example :
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 *.
Un example:
How it's is possible to realize this result in SAS?
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.
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;
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.