Multiselect Parameter, error when giving parameter input in calculated field

Hi
I created a multiselect parameter, and gave value for it like Sales Units ASP.
Now when i am creating calculated field which i will give in as values to visuals/ tables
i am getting this error.

I have created single value parameters and used the same logic for calculated field it worked but for multiselect parameter it is throwing the attached error can someone please help me this error.

You need to use the in function.

ifelse(in('Units',${TOPLINE}),sum(units),sum(0))

Let me know if that works

It worked, Thank you so much

Follow up question @Max

Now when I use the same calculated field in any table and select multiple values let say sales and units together, in the table it is not giving me two rows separately for the 2 different options that i have selected from the Multi select parameter control it is right now i think adding sales and units together and showing.

Is it possible to show different values in different rows or columns as per as selection from the dropdown multiselect parameter control ?