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.
try using ifn function.
for example
x=y-ifn(missing(z),0,z);
In the Visual Analytics expression editor, you would use the Missing() operator, like this:
IF ( 'Invoice'n Missing )
RETURN 0
ELSE 'Invoice'n
Thx! 🙂
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.