If B is based on a single observation, where GroupVariableA has been defined as a DISPLAY or ORDER variable, then a simple WHERE clause will eliminate the rows where _B is LT 1000 or GT X. However, if B is summarized based on your GroupVariable_A actually being defined with a usage of GROUP in PROC REPORT, then you will need to "pre-summarize" your data to determine which rows should "go forward" to PROC REPORT. There have been some previous postings on the subject, but it will be simple enough to do -- just use PROC MEANS, PROC SQL, PROC TABULATE and/or PROC REPORT to get summarized values and then eliminate the summarized rows that do not conform to what you want.
This does mean making 2 passes through the data. Just remember that any grand totals will not include those variables' values, if you eliminate the rows from the summary data -- unless you work on getting the numbers back in the total.