The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again

Hi i am new to quicksight
getting this error (The syntax of the calculated field expression is incorrect. Correct the syntax and choose Create again.)while using below calculation can any one help on that .
ifelse(${Selectmeasure}=‘Loan Amount’,sum({Loan Amnt}),${Selectmeasure}=‘Members’,count({Member Id}))

Hi !

When using the ifelse function, you must specify the behavior of your calculated field if the parameter value doesn’t match either ‘Loan Amount’ or ‘Members’. In other words you’re missing an ‘else’ expression.

You could use this if you only have 2 potential parameter values:

ifelse(${Selectmeasure}=‘Loan Amount’,sum({Loan Amnt}),count({Member Id}))