Hi i have a sample dataset where i need to apply logic to unique_id as per code it has in waterfall manner. For instance if for unique ID 1, Code A is found which gets Yes in preference then other instance of unique ID 1 will get "no" in Preference column for unique ID 2 Code B is found which gets Yes in preference then other instance of unique ID 2 will get "no" in Preference column for unique ID 3 Code E is found which gets Yes in preference then other instance of unique ID 3 will get "no" in Preference column so waterfall for Code follows the order as A,B,E,D,C. So A gets first prefernce if found for unique id, B gets second and so on How can i apply this waterfall for unique id. So in nutshell if i find a code for unique id as per Waterfall it should get Yes in preference and rest all other instance of same unique id get No in preference. UNIQUE_ID CODE Preference 1 A Yes 1 B no 2 B Yes 2 C no 3 C no 3 D no 3 E Yes
... View more