I have 5 columns of data set and want to group by on two of those. I have no problem in grouping them but I want to assign a incremental flag value to each of those group so I can apply my function later on each of the groups according to the flag. I am facing problem in assigning a flag. Here is the data.
A B C D E
abc def u 10 12
abc def v 3 32
abc def x 12 3
abc def y 13 45
abc ghi z 23 12
......
So here, for abc & def I want the flag column value as '1'. For abc & ghi I want the flag column value as '2' and so on.
Please let me know if I have asked the question in correct way so I can rephrase it. Thanks a tonn!