LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 17 Nov 2008 02:39:11 -0800
Reply-To:     karma <dorjetarap@GOOGLEMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         karma <dorjetarap@GOOGLEMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: count of non-missing values in a row
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On 17 Nov, 10:22, shashi <shashi2...@gmail.com> wrote: > Hi, > My data looks like below. > > id a b c > 1 2 . 2 > 2 1 10 . > 3 . . 3 > 4 . 3 25 > > I want another column which has the count of non-missing values of a, > b and C. i.e. > I want the data like: > > id a b c cnt > 1 2 . 2 2 > 2 1 10 . 2 > 3 . . 3 1 > 4 . 3 25 2 > > Could anybody suggest regarding this?

Hi Sashi,

You can use the n function to get the number of non missing values

HTH


Back to: Top of message | Previous page | Main SAS-L page