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?