I have a sample table like this:
base
I wanted to flag if there is an increase in Output of the same ID compared to the previous Date. Note that the data is only sorted by Date.
Expected output: output
I've been trying to find the correct formula so that it only compares between current output with previous output of the same ID in previous date with INDEX-MATCH functions and had no luck. Thank you for your assistance.
=IF(AND(D2>INDEX($D$2:$D$9, MATCH(C2,$C$2:$C$9,0)-1), C2=INDEX($C$2:$C$9, MATCH(B2,$B$2:$B$9,0)-1)), "Flag", "")