Nested if

Nested if

Hello,
I'm trying to use a nested if as an agregate formula with an existing agregate formula, however I´m getting a message the specified formula is invalid

if("SETTLEMENTS_ENC"."Testing" >= 600,1500,if("SETTLEMENTS_ENC"."Testing">=525,1000,500))