Multi-value parameter - way to determine if a single value/ multiple values / all values are selected

Multi-value parameter - how to determine if a single value/ multiple values / all values are selected. Given that multi-value parameter is not supported in calculated field.

Thanks!

Hi @lbl,
While multi-value parameters can be used in calculated fields for some scenarios, I agree that this may not be one of those times as I’ve worked on a similar requirement for a while with little success (Here’s an old post that explores multi-value params in calc. fields that’s worth checking out
However, this can be accomplished through using customSQL; essentially you’ll want to run a count on the distinct values available. The logic below most likely will have to change based on your desired output but it could look similar to the following:

select
case
when count(distinct <<$param>>) = 1 then 'Single'
when count(distinct <<$param>>) < total_count then 'Multiple'
else 'All'
end as selection_type

Here’s some documentation around using dataset parameters in SQL: