Hi everyone, I have a data set consist two columns, column 1 is item ID, column 2 is the purchase price for this item id in different transactions. Now I would like to add an additional column (column 3) which counts the number of purchase prices that is less than the purchase price for current transaction of the row, grouped by item ID. For example, item ID 1 has 3 transaction prices that are less than 23.1 (20.4, 13, 14), hence column 3 for row 1 should be 3. It looks like a very common questions but I have searched the forum and found nothing related to this topic. Is this doable (practically)? and how could I achieve this with SAS EG? Please send me the link if this has been raised & resolved earlier? ID Price Column(3) 1 23.1 3 1 20.4 2 1 13 0 1 49.5 5 1 23.4 4 1 14 1 1 56.7 6 2 234 3 2 323 4 2 232.4 2 2 145.6 1 2 100 0 3 33.4 2 3 54 3 3 32.4 1 3 23.1 0 3 54 3 Thanks everyone for reading. JK
... View more