Help with IFELSE formula

I have a formula (listed below) that Quicksight doesn’t seem to like

ifelse(contains({lease_status}, “Renewal Lease Approved”), count({resident}) * 35, count({resident}) * 50)

The purpose of the formula is going to be if the lease status is the phrase “Renewal Lease Approved”, then it will multiply the amount of residents that that have that phrase by 35. If it does not contain that phrase, it will multiple it by 50.

The {resident} portion is just a string name of a person.
{lease_status} is also a string of either two phrases. “Renewal Lease Approved” or “Lease Approved”

Hi @ScottP
What exactly

Quicksight doesn’t seem to like

? What is the error telling you?

It just says a syntax error.

Hi @ScottP -
Are you still having issues with this calculation? If so, I would strip out the counts for now and add them step by step to try and determine cause of the error.

Start with something like: ifelse(contains({lease_status}, “Renewal Lease Approved”), 1,0).
If that works, then add one of the count metrics back and so on.

Best Regards,