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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 943 views
  • 1 like
  • 3 in conversation