I have a following table
Id Values
1 A
1 A
1 B
2 @
2 @
2 @
3 A
3 A
3 A
3 A
3 @
4 B
4 B
4 B
Output:
Id Values
1 @
2 @
3 A
4 B
Within each Id group, if all values are @, I want to set the value for that Id to @ else if all values for Id are same (ignoring @s) (e.g. all As), set the value for that Id to be that value (A) else set value of id to @.
This question has been answered in sqlserver and I am trying to replicate code in SAS I need to do this in SAS. But somehow NULLIF in SAS is not working. can some one guide me how can I do this in SAS?