This is my simple calculation:
X = Sum [_ByGroup_] ('y'n) - Sum [_ByGroup_] ('z'n)
If either y or z is missing then x become missing. Here is an example
I want y = 9, z = 0 -> X = 9
Otherwise I will Group the vales in SAS EG before uploading to Viya.
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.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.