BookmarkSubscribeRSS Feed



I'm moving some SGPLOT code from 9.3 to 9.4M3, and I'm getting:

  WARNING: The data for boxes is incomplete or invalid. Some boxes will not be drawn.


I know I get the warning if there is a group with all missing values, e.g. below will generate it because y is always missing for group 1:


data a ;
  do group=1 to 5 ;
    do id=1 to 10 ;
      if group>=2 then y=ranuni(0) ;
      output  ;
    end  ;
  end ;
run ;

proc sgplot data=a ;
  vbox y / category=group ;
run ;


Are there any other conditions that would generate this warning?


I saw this note about a bug in 9.4M0, but it says it's fixed in M3, and indeed I could not replicate it when there is only 1 data point in a group.


I don't particularly like this warning.  And seems inconsistent that VBOX throws it, but VBAR does not throw an analagous warning.


proc sgplot data=a ;
  vbar group / response=y;
run ;


If it is only thrown when there is a group with all missing values, I will add it to my list of ignorable log warnings.




Check out the Boston Area SAS Users Group (BASUG) video archives:
Super User

How about sharing the data and actual code submitted.

When something sounds like a data issue then check the data.


Perhaps you are using a FREQ option and the value for the FREQ is missing for one or more records of the box variable

Have you tried using the option MISSING?


Thanks @ballardw.  The code in my post  is the actual code submitted (it generates sample data, and then PROC SGPLOT makes the plot).  And in 9.4 M3, it throws the warning (does not in 9.3).


In that example, it throws the warning because there is one group where all values of the response value are missing.


My question is, are there any other circumstances in which that warning would be generated?


My side comment is that the warning doesn't seem very useful, and is not generated in other similar situations, such as the vbar chart.



Check out the Boston Area SAS Users Group (BASUG) video archives:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation