How do I go about setting up conditional formatting based on the cell above?

I did:

Condition 1:

Formula is: A1=A2

However this causes conditional formatting not based on the above cell, but the below cell. How do I get it to be the above cell?

Note: Formula is: A2=A1 does the same thing as A1=A2

Thanks for any help you can provide!