BookmarkSubscribeRSS Feed
Gick
Pyrite | Level 9
data intiale;
input numClient @@ CO_CODE $ type_appel $ nb_appels @@  revenu @@ pct_rdv @@;
datalines;
21225 A abouti 1 20 2
55555 D repondeur 1 5 1
55558 C repondeur 6 2 3
21223 A abouti 1 1 4
55554 D abouti 1 3 1
55528 C repondeur 6 4 0
21325 A abouti 1 0 2
51555 E repondeur 1 10 1
50558 C coupure 6 2 3
;
run;

PROC REPORT DATA=intiale ;
COLUMNS CO_CODE type_appel nb_appels revenu pct_rdv;
DEFINE type_appel / display;
DEFINE co_code / GROUP ;
COMPUTE AFTER; type_appel='TOTAL'; endcomp;
RUN ;   

Hello, After a lot of research, I couldn't find the solution to my problem. I would like to add at the end of my proc report two lines representing the subtotal for the 'successful call' modality and for the 'Answer message' modality which would display: 1- The sum of the number of calls 2- The sum of the number of applications. Can you help me please ? Thanks

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please help us. Can you do some basic translating for us? What variable is  'Answer message' and what variable is 'successful call' and what are the variable names you want to sum?

--
Paige Miller
Gick
Pyrite | Level 9
Hello,

These are the variables : nb_appels and pct_rdv
PaigeMiller
Diamond | Level 26

Sorry, I asked for 3 variable names, and you only gave us two names.

 

Also, I asked for other information, specifically which are the category variables and which is the variable to be summed.

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 986 views
  • 0 likes
  • 2 in conversation