Hi all: The question I need to answer is: for people who have a defined DX1 value (in this case, 5990), what are the most frequent codes that exist across DX2 through DX30? I'm trying to build out a profile of the "most common case" based on these codes. In other words, for people with 5990, the ten most frequent codes are "A (freq, x%) ,B (freq, x%) etc..." I think I need two steps: Create a dataset containing observations with 5990 in DX1. This is done already. For DX2 - DX 30 (the dataset extends through 30 but I trucated to make it easier to see), determine the most frequent values across all 29 variables and across all other observations. Many thanks for your help! (I use 9.4, if that helps.) DX1 DX2 DX3 DX4 DX5 DX6 DX7 DX8 5990 2859 1302 V5869 5990 5990 2768 42789 49390 25000 2720 V5869 V5866 5990 4149 25000 4019 V5866 V5869 5990 5990 4019 5715 45621 5990 7881 4019 2720 53081 V5869 V4589 V5866 5990 42731 25000 V5869 5990 27650 V5869 53081 4019 2720 5990 78701 78791 5990 4019 2720 V5869 5990 78820 78097 29420 V1309 5990 413 4264 78607 V1254 33829 5990 40391 5856 V4511 V4573 V1051 1970 V1011
... View more