- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can anyone please clarify the following for me? I have two different answers from certification practice exams and I really don't understand. Example 2 makes sense to me...SUM ignores missing values. But then there's Example 1 that uses SUM but in that one "missing" makes the total SUM missing. Any clarification is greatly appreciated - thanks!
Example 1
ACredit = . ;
BCredit = 1;
TotalCredits = sum (ACredit + BCredit) + 2;
What is the value of TotalCredits? Answer = Missing numeric value
Explanation: when the SUM function is called with a single argument, it returns the value of that argument. In this case, it is called
with a missing value, so it returns a missing value.
Example 2
ACredit = . ;
BCredit = 1;
TotalCredits = sum (ACredit, BCredit) + 2;
What is the value of TotalCredits? Answer = 3
Explanation: The SUM statement ignores missing values.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Reeza, that explains it very well!
I appreciate your help!
Bill