in the sample code, below, I can't figure out why the plotted lines aren't breaking at "Calc_4", which has a missing value?
thanks for any suggestions,
Dave
data test;
length Q $ 10;
input Q $ Q1 Grade Value;
datalines;
Calc_1 1 8 77
Calc_1 1 9 81
Calc_2 2 8 69
Calc_2 2 9 73
Calc_3 3 8 64
Calc_4 . . .
Non-Calc_1 1 8 83
Non-Calc_1 1 9 83
Non-Calc_2 2 8 84
Non-Calc_2 2 9 86
Non-Calc_3 3 8 83
Non-Calc_3 3 9 84
;
run;
proc format;
value $qfmt
'Calc_4' = ' ' ;
run;
proc sgplot data=test; format Q $qfmt.;
series x = Q y = value/group=grade BREAK ;
xaxis DISCRETEORDER=DATA ;
run;
Maybe you need to add two records having missing values with Grade equal to 8 and 9? Like below:
data test;
length Q $ 10;
input Q $ Q1 Grade Value;
datalines;
Calc_1 1 8 77
Calc_1 1 9 81
Calc_2 2 8 69
Calc_2 2 9 73
Calc_3 3 8 64
Calc_4 . 8 .
Calc_4 . 9 .
Non-Calc_1 1 8 83
Non-Calc_1 1 9 83
Non-Calc_2 2 8 84
Non-Calc_2 2 9 86
Non-Calc_3 3 8 83
Non-Calc_3 3 9 84
;
run;
Maybe you need to add two records having missing values with Grade equal to 8 and 9? Like below:
data test;
length Q $ 10;
input Q $ Q1 Grade Value;
datalines;
Calc_1 1 8 77
Calc_1 1 9 81
Calc_2 2 8 69
Calc_2 2 9 73
Calc_3 3 8 64
Calc_4 . 8 .
Calc_4 . 9 .
Non-Calc_1 1 8 83
Non-Calc_1 1 9 83
Non-Calc_2 2 8 84
Non-Calc_2 2 9 86
Non-Calc_3 3 8 83
Non-Calc_3 3 9 84
;
run;
Hello @Dave25,
Glad to see that @jjjch's solution worked for you. Then it would help later readers if you marked that helpful reply as the accepted solution, not your own "thank you" post. Could you please change that? It's very easy: see instructions here (if needed): https://communities.sas.com/t5/SAS-Programming/how-to-find-the-difference-between-two-hex-data/m-p/5...
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 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: