Creating parameter and using it as a filter

I’m trying to use parameter in QuickSight in a calculated field.
The logic I’ve used for the calculation is:
ifelse(${paramdate} = ‘Weekly’, {date_week}, ${paramdate} = ‘Monthly’, {date_month}, ${paramdate} = ‘Quarterly’, {date_quarter}, {date_year})

Screenshots of parameter and error message are.
I’ve also tried double quote but that did not work either.

Did you mean to upload screenshots?

Hi @Jenny_Park

We have not heard back from you regarding your question. We would still like to help. If we do not hear back in the next 3 days, we will archive the question