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

Hey,

This topic's for an implementer, so there must be no SAS code involved:

As seen in the following picture, I have two select blocks. One containing populations X1 and X2, and another containing a sub group of X1.
Eventually, I need to hold X2 and the sub group of X1 in the same block.
I have no way to distinguish between X1 and X2 (they are just a list of ID's).
Is there a way to remove the population of sub X1?

Generally, in SQL I'd write:
select ID from X1
union
select ID from X2
minus
select ID from subX1

Eitan123_0-1634561850260.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
JamesAnderson
SAS Employee

Hi Eitan123,

If I understand your question correctly (you want to remove subX1 from X1plusX2) then you can use the Prioritize Node for this. Add a Prioritize Node to the diagram, connect "subX1" then connect "X1+X2". Done. When you run the prioritize node subjectIds that exist in both groups will first be placed into subX1 and not into "X1+X2". What remains of "X1+X2" are only those subjectIDs that were not in your "subX1".

 

Regards

James

 

View solution in original post

1 REPLY 1
JamesAnderson
SAS Employee

Hi Eitan123,

If I understand your question correctly (you want to remove subX1 from X1plusX2) then you can use the Prioritize Node for this. Add a Prioritize Node to the diagram, connect "subX1" then connect "X1+X2". Done. When you run the prioritize node subjectIds that exist in both groups will first be placed into subX1 and not into "X1+X2". What remains of "X1+X2" are only those subjectIDs that were not in your "subX1".

 

Regards

James

 

How to improve email deliverability

SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 443 views
  • 0 likes
  • 2 in conversation