September 2019
Beginner to intermediate
346 pages
7h 35m
English
If the objective is to only select the first non-missing value from amongst the options, we can use COALESCE for numeric and the COALESCEC function for character values.
Both functions accept multiple arguments. They check the value of each argument in the order in which they are specified and output the first non-missing value. If only one value is present, then the functions return that value. If none of the arguments have a value, then the function returns a missing value (not 0). We will see how these two functions work in the following example:
Data Select;A = Coalesce(1,2,3,4,5,6,7,8,9,10,1);B = Coalesce(1,2,.,.,5,6,7,8,9,10,1);C = Coalesce(1.,2.,.,.,5,6,7,8,9,10,1);D = Coalesce(.,.,.,.,.,.,.,.,.,.,.);E =
Read now
Unlock full access