BookmarkSubscribeRSS Feed
yogita_patel
Calcite | Level 5

Hi, 

How can I get the output for values as like compare value. Because of the alignment in value my proc compare report is showing mismatch value. I want output like compare value

can someone help me please?

 

yogita_patel_0-1654810171874.png

 

4 REPLIES 4
Reeza
Super User
Show your code for how you created Base Values, assuming that's the one that you want changed.
yogita_patel
Calcite | Level 5


data adae_com3;
set adae_com2;
length col2 col3 col7 $25.;
col2 = strip (C1002) ||' '|| strip(put(round(input(C1002,best.)*100/&n02,0.1),perc.));
col3 = strip (C1005) ||' '|| strip(put(round(input(C1005,best.)*100/&n05,0.1),perc.));
col7 = strip (total) ||' '|| strip(put(round(input(total,best.)*100/&nt,0.1),perc.));

run;

ballardw
Super User

@yogita_patel wrote:


data adae_com3;
set adae_com2;
length col2 col3 col7 $25.;
col2 = strip (C1002) ||' '|| strip(put(round(input(C1002,best.)*100/&n02,0.1),perc.));
col3 = strip (C1005) ||' '|| strip(put(round(input(C1005,best.)*100/&n05,0.1),perc.));
col7 = strip (total) ||' '|| strip(put(round(input(total,best.)*100/&nt,0.1),perc.));

run;


You are missing some details such as values of macro variables &n02, &n05, &nt, example values for variables C1002, C1005 and Total, the definition for the custom format PERC, and some actual desired results for provided values of C

Reeza
Super User
Can you share some input data and the perc format?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 691 views
  • 0 likes
  • 3 in conversation