I have a dataset that looks like below. Column E would be my formula column. I would like Column E to read "Max" for the row where the ID contains the max probability for that state. If two IDs for the same State have the same probability, as in Maryland, I want "Max" to show for the ID with the nearest Date. If two IDs match on both Probability and Date, then I want "Max" to appear for only one ID within each group of States.
Column A Column B Column C Column D Column E
State Probability Date ID Formula Field
California 10% 12/31/2016 123
California 20% 1/7/2017 129
California 23% 1/14/2017 135 Max
Colorado 26% 1/21/2017 141
Colorado 38% 12/31/2016 147 Max
Illinois 44% 1/14/2017 153 Max
Illinois 44% 1/14/2017 159
Illinois 20% 1/21/2017 165
Illinois 35% 1/28/2017 171
Maryland 41% 2/4/2017 177
Maryland 41% 12/31/2016 183 Max
Maryland 35% 1/7/2017 189
Michigan 20% 1/14/2017 195
Michigan 35% 1/21/2017 201
Michigan 38% 1/28/2017 207 Max
West Virginia 41% 2/4/2017 213
West Virginia 44% 2/11/2017 219 Max
Aucun commentaire:
Enregistrer un commentaire