BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dave25
Quartz | Level 8

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;

1 ACCEPTED SOLUTION

Accepted Solutions
jjjch
Obsidian | Level 7

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;

View solution in original post

3 REPLIES 3
jjjch
Obsidian | Level 7

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;
Dave25
Quartz | Level 8
eureka! that works - thanks
FreelanceReinh
Jade | Level 19

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...

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 1279 views
  • 1 like
  • 3 in conversation