Ifelse Calculated Field with Parameter

I am trying to create a ifelse calculated field with parameter in the condition expression. I was able to successfully create the calculated field but I am unable to use it as a measure in the views. The formula for calculated field is as below:

ifelse(${parameter} = [‘value1’], {column1}, ${parameter} = [‘value1’, ‘value2’], {column1} + {column2}, {column2})

parameter - String type, multiple values so takes input as a string list
column1, column2 - number

I expect this calculation to create a numerical measure based on the value of the parameter. I have a parameter control to control the values of the parameter. The control has only 2 values value1 and value2. I need help in understanding how can I use this field as a measure in a view. I get the below error while doing that and it does not say what’s the issue.

Screen Shot 2023-03-14 at 12.31.07 PM

Hmm, I would suggest opening up a support case ticket.

Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps


hi @Chirag_Karkera - Is it possible to give sample input data and expected output so that i can give a try to replicate the issue…

Regards - San

1 Like

Example inputs:
column1 column2
10 20

Parameter value and sample outputs:
parameter = [‘A’] then output = 10
parameter = [‘B’] then output = 20
parameter = [‘A’, ‘B’] then output = 30

1 Like

Hi @Chirag_Karkera, the function ‘in’ should help you with your use case:

I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community Q&A Forum!


1 Like