BookmarkSubscribeRSS Feed
Antani
Calcite | Level 5

Hi,
in the attached Table I would like to obscure the entire row when the values ​​of the "Componenti Totale" variable are lower than 3 (in the case in question, instead of all the values ​​of SECS-P / 05 - Econometria, SECS-P / 13 - Scienze Merceologiche and SECS-S / 05 - Statistica Sociale I wish I could put an asterisk).

immagine.png


I tried to insert a statement like this in the proc format:

 

value hide
0-3 = "*"
other = [comma8.];

 

and insert the format in the PROC REPORT that I use, but this only obscures the values ​​of "Componenti Totale" below 3 (while I would need the values ​​of the entire row to be obscured, keeping the name of the Settore Scientifico Disciplinare).

 

title1 j=l bold color=navy height=2 "Tavola 1 - Distribuzione per Settore Scientifico Disciplinare";

proc report data=archivi.dati_finali nowd vardef=n ;
columns ssd_cod_desc giorni_ruolo ('Componenti' n_comp anzianita_ruolo) n_soglie_sup,(sum std) tasso_f2 tasso_f1 tasso_co n_soglie_succ ('Indicatori UNIFI' indi_1 indi_2
        tasso_succ indi_3 indi_4 indi_5 indi_6);
define ssd_cod_desc / group "Settore Scientifico Disciplinare";
define giorni_ruolo / analysis noprint;
define n_comp / analysis sum "Totale" format=hide.;

define anzianita_ruolo / computed f=commax8.2 "Anzianità nel ruolo";
compute anzianita_ruolo;
   anzianita_ruolo= giorni_ruolo.sum / (n_comp.sum*365.25);
endcomp;

define n_soglie_sup / analysis "Soglie superate";
define sum / "Totale";
define std / "Deviazione standard" f=commax8.2;
define tasso_f2 / analysis mean f=commax8.2 "Tasso possesso requisiti PA" noprint;
define tasso_f1 / analysis mean f=commax8.2 "Tasso possesso requisiti PO" noprint;
define tasso_co / analysis mean f=commax8.2 "Tasso possesso requisiti CO" noprint;

define n_soglie_succ / analysis noprint;

define indi_1 / computed f=commax8.2 "A1 / (%)";
compute indi_1;
   indi_1=(n_soglie_succ.sum / (n_comp.sum*3))*100 ;
endcomp;

define indi_2 / computed f=commax8.2 "A2 / ";
compute indi_2;
   indi_2=(n_soglie_succ.sum / n_comp.sum);
endcomp;

define tasso_succ / analysis noprint;

define indi_3 / computed f=commax8.2 "A3 / ";
compute indi_3;
   indi_3=(tasso_succ.sum / n_comp.sum);
endcomp;

define indi_4 / computed f=commax8.2 "A4 / (%)";
compute indi_4;
   indi_4=(n_soglie_sup.sum / (n_comp.sum*9))*100 ;
endcomp;

define indi_5 / computed f=commax8.2 "A5 / ";
compute indi_5;
   indi_5=(n_soglie_sup.sum / n_comp.sum) ;
endcomp;

define indi_6 / computed f=commax8.2 "A6 / ";
compute indi_6;
   indi_6=mean(tasso_f2.mean, tasso_f1.mean, tasso_co.mean);
endcomp;

compute ssd_cod_desc;
      count+1;
      if mod(count,2) then do;
         call define(_row_, "style", "style=[background=paoy]");
      end;
   endcomp;

run;

 

A possible solution would be to carry out a date step that excludes the Settore Scientifico Disciplinare with values ​​lower than 3 and then generate the PROC REPORT without having to obscure anything, but if you have a better solution I will gladly apply it.

 

Thank you for your attention.

 

Giacomo.

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I am not 100% sure what you mean by "obscure", however, this is worth a try:

 

For the rows where you have < 3 Componenti Totale, you can turn the text to the same color as the background, meaning that the cells will appear to be blank or empty, while leaving the text in the column still having the black color (if that is what you want).

--
Paige Miller
Antani
Calcite | Level 5

Thank you very much.

"Obscure" means than I want to put an asterisk on the entire row when the values ​​of the "Componenti Totale" variable are lower then 3.

Since the rows of the table are colored alternately, I don't know if it is easy to apply your solution, since initially I don't know which values ​​must be obscured and in which rows they will appear.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 568 views
  • 0 likes
  • 2 in conversation