Jack Adams Posted August 1 Share Posted August 1 Hi! I am computing an indicator in a datamanager. The numerator of the indicator formula is the sum of 3 columns, and it returns missing if at least 1 of the 3 columns is missing. If the value is missing, I would like to consider it as 0, without modifying the 3 columns. Is it possible? Thanks  Want to know more? Link to comment Share on other sites More sharing options...
Nicolò Posted August 3 Share Posted August 3 Hi Jack! If you write the formula as $”attribute1”+$”attribute2”+…, it returns missing if at least one is missing, but you could use sum(($”attribute1”,$”attribute2”,..)) to obtain your desired result.Alternatively, you can use ifelse($”attribute1” is None,0,$”attribute1”) + ifelse($”attribute2” is None,0,$”attribute2”)+….. I hope it helps! Want to know more? Link to comment Share on other sites More sharing options...
Jack Adams Posted August 7 Author Share Posted August 7 Thank you. I thought the sum function calculates by column. I'll try it! Â Want to know more? Link to comment Share on other sites More sharing options...
Nicolò Posted August 14 Share Posted August 14 If the argument of a function is a list of multiple attributes enclosed in double brackets, then the sum is performed by row. Want to know more? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.