Trouble with a nested IF function in formula column

Hi all!

I’m trying to create a complicated formula with several conditions. Basically, I want one value multiplied by .025 unless it meets these conditions:

  • compensation type is LPC and lender is Trustmark → multiply value by 0.02
  • compensation type is LPC and lender is UWM and purpose is refinance → multiply value by 0.02
  • compensation type is BPC → return 0
    I’m also trying to round to two decimal points.

Here is what I’ve come up with:
ROUND(IF((AND({Comp Type} = “LPC”,{Lender} = “Trustmark”),{Loan Amnt} * 0.02, IF(AND({Comp Type} = LPC,{Lender} = “UWM”,{Purpose} = “Refinance”),{Loan Amnt} * 0.02, IF({Comp Type} = “BPC”,0,{Loan Amnt} * 0.025)))),2)

Obviously this is not working, but I can’t quite figure out why. Does anyone have any insight?

Thank you so much!!