Error with long if clause | Formulas have no error messages

Hi!

I’m having trouble finding out how to fix this long if conditional clause in a formula column I have on a board.

The goal is to first check if the deal is a Rental. If it is, then the splits are calculated having the total comission generated from the entire deal in mind. If not, the splits are calculated having only the comission generated from the first contract in mind.

Here is the code:

IF ({Type of deal} = “Rental”, IF({Agent} = “Simone”, {Total Comission} * 0.4, IF({Agent} = “Hugo”, {Total Comission} * 0.5, IF({Agent} = “Guilherme”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.5”, {Total Comission} * 0.25, IF({Agent} = “Pedro”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.25”, {Total Comission} * 0.125, 0)))))) , IF({Agent} = “Simone”, {Comission on first contract} * 0.4, IF({Agent} = “Hugo”, {Comission on first contract} * 0.5, IF({Agent} = “Guilherme”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.5”, {Comission on first contract} * 0.25, IF({Agent} = “Pedro”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.25”, {Comission on first contract} * 0.125, 0)))))))

Some screenshots:

Thanks in advance for the help!

Hey @joao.zoio - formulas are always a bit fun to troubleshoot :slight_smile: this should work:

IF({Type of deal} = “Rental”, IF({Agent} = “Simone”, {Total Comission} * 0.4, IF({Agent} = “Hugo”, {Total Comission} * 0.5, IF({Agent} = “Guilherme”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.5”, {Total Comission} * 0.25, IF({Agent} = “Pedro”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.25”, {Total Comission} * 0.125, “No agent assigned”)))))), IF({Agent} = “Simone”, {Comission on first contract} * 0.4, IF({Agent} = “Hugo”, {Comission on first contract} * 0.5, IF({Agent} = “Guilherme”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.5", {Comission on first contract} * 0.25, IF({Agent} = “Pedro”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.25", {Comission on first contract} * 0.125, “No agent assigned”)))))))

-Daniel

1 Like

Hey Daniel! Thank you so much for the response. Unfortunately it still does not work.

Just to clarify, here is the code you suggested:

IF({Type of deal} = “Rental”, IF({Agent} = “Simone”, {Total Comission} * 0.4, IF({Agent} = “Hugo”, {Total Comission} * 0.5, IF({Agent} = “Guilherme”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.5”, {Total Comission} * 0.25, IF({Agent} = “Pedro”, {Total Comission} * 0.4, IF({Agent} = “Stephanie 0.25”, {Total Comission} * 0.125, “No agent assigned”)))))), IF({Agent} = “Simone”, {Comission on first contract} * 0.4, IF({Agent} = “Hugo”, {Comission on first contract} * 0.5, IF({Agent} = “Guilherme”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.5", {Comission on first contract} * 0.25, IF({Agent} = “Pedro”, {Comission on first contract} * 0.4, IF({Agent} = “Stephanie 0.25", {Comission on first contract} * 0.125, “No agent assigned”)))))))

Here is my adaptation of your code to my actual situation (just translated the terms in order to facilitate the interpretation):

IF({Tipo de Negócio} = “Arrendamento”, IF({Parceiro Externo} = “Simone”, {Valor Total Report} * 0.4, IF({Parceiro Externo} = “Hugo”, {Valor Total Report} * 0.5, IF({Parceiro Externo} = “Guilherme”, {Valor Total Report} * 0.4, IF({Parceiro Externo} = “Stephanie 0.5”, {Valor Total Report} * 0.25, IF({Parceiro Externo} = “Pedro”, {Valor Total Report} * 0.4, IF({Parceiro Externo} = “Stephanie 0.25”, {Valor Total Report} * 0.125, “Sem parceiro externo”)))))), IF({Parceiro Externo} = “Simone”, {Comissão Agência no CPCV} * 0.4, IF({Parceiro Externo} = “Hugo”, {Comissão Agência no CPCV} * 0.5, IF({Parceiro Externo} = “Guilherme”, {Comissão Agência no CPCV} * 0.4, IF({Parceiro Externo} = “Stephanie 0.5", {Comissão Agência no CPCV} * 0.25, IF({Parceiro Externo} = “Pedro”, {Comissão Agência no CPCV} * 0.4, IF({Parceiro Externo} = “Stephanie 0.25", {Comissão Agência no CPCV} * 0.125, “Sem parceiro externo”)))))))

So basically:

Type of Deal -> Tipo de Negócio
Rental -> Arrendamento
Agent -> Parceiro Externo
Total Comission -> Valor Total Report
Comission on first contract -> Comissão Agência no CPCV
No agent assigned -> Sem parceiro externo

Thank you in advance for any other attempts you take at this! It’s been revolting me quite a bit these past few days ahaha.

Regards!