Select multiple values and pass to calculated field

Hello Quicksight team! I am trying to pass multiple team values to change target value in KPI visual. There are 10 teams in the dataset for which I have created a parameter called <> with Values = single value. A target revenue calculated field called “RevTarget” is created. This depends on the selection done in <<Team_single>> parameter – this correctly shows target for one team at a time.

RevTarget = ifelse(
${Team_single}='A', 3000,
40000)

Now, I want users to select multiple teams and RevTarget should modify for all selected teams. Created a parameter <<Team_multiple>> with Values = multiple values. But the same above formula cannot be applied, error below.

Expression ifelse(
${Team_single}=‘A’, 3000,
40000) for function = has incorrect argument type String List = String. Function syntax expects ‘<COMPARABLE_TYPE> = <COMPARABLE_TYPE>’.

Is there a way to achieve target value for multiple teams? Thank you for your help!

You should use “in” function to check condition.
Something like
ifelse(in(TeamName, ${SelectedTeams}), 3000,40000)

Documentation for the function in - Amazon QuickSight

2 Likes

Thank you Tatyana, I will try.