# Multi-select dropdown parameter doesn't allow CONTAINS filter

**URL:** <https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601>\
**Category:** Q&A\
**Tags:** quick-sight\
**Created:** [June 13, 2023, 4:58pm UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601 "2023-06-13T16:58:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpanati](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tpanati](https://community.amazonquick.com/u/tpanati)\
**Post date:** [June 13, 2023, 4:58pm UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601/1 "2023-06-13T16:58:12Z")

</div>

Hello,

I have a use case where I have enabled control for a multi select dropdown for two different parameters which filter the data in my visuals.  
Along with this for the corresponding visual I have filter applied (Include filter) which is based on a calculated field say “KPISUB”. This calculated field contains functions - ifelse, contains. But once this filter is enabled, I keep getting an error with the two multiselect parameter controls saying -

Following items are incompatible with Multi-select drop down. Please update/remove them to fix the broken visuals.

Filter - “CONTAINS” filter on column KPI\_SUB

I removed the contains function in the calculated field KPI\_SUB and used left function to just compare and check if the left of the string contains the sub string. But still this error is not disappearing. Can you please suggest an alternative?

---

<div class="post-metadata">

**Author:** ![tarushtg](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@tarushtg](https://community.amazonquick.com/u/tarushtg)\
**Post date:** [June 14, 2023, 2:45pm UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601/2 "2023-06-14T14:45:10Z")

</div>

The error message you’re encountering indicates that the multi-select dropdown controls you’ve enabled are not compatible with the “CONTAINS” filter applied on the column KPI\_SUB in your visuals. It seems that the filter is causing conflicts with the multi-select functionality.

To resolve this issue, you can consider an alternative approach for filtering based on the KPI\_SUB column. Instead of using a “CONTAINS” filter, you can try using a different filter type that is compatible with multi-select dropdown controls.

One possible alternative is to use a “IN” filter. Instead of filtering based on partial string matches, you would filter based on exact matches. Here’s an example of how you can modify your calculated field and filter expression:

1. Modify your calculated field, KPI\_SUB, to generate a list of values or categories. Instead of using the “contains” function, you can use a combination of logical conditions (e.g., “IF” or “CASE” statements) to assign values to specific categories.

2. Apply an “IN” filter on the KPI\_SUB column in your visual. In the filter settings, you can select the “Include” option and choose the desired categories or values from the multi-select dropdown controls.

By using the “IN” filter with exact matches and modifying your calculated field to generate specific categories, you can maintain compatibility between the multi-select dropdown controls and the filter applied on the KPI\_SUB column. This should help resolve the error and allow you to filter your visuals based on the selected categories or values.

---

<div class="post-metadata">

**Author:** ![tpanati](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@tpanati](https://community.amazonquick.com/u/tpanati)\
**Post date:** [June 16, 2023, 10:08pm UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601/3 "2023-06-16T22:08:59Z")

</div>

@tarushtg Thank you for taking time to explain.

Just wanted to check if LIKE is a keyword that can be used in Quicksight calculated functions? I am unable to find any such keyword.

---

<div class="post-metadata">

**Author:** ![Max](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/max/32/2288_2.png) [@Max](https://community.amazonquick.com/u/Max)\
**Post date:** [June 30, 2023, 5:53pm UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601/4 "2023-06-30T17:53:29Z")

</div>

HI @tpanati

Have you tried using the locate function in Quick Sight as a substitute for like?

For example you could use: ifelse(locate(expression, substring) \>0, then-expression-1)

> **[Locate - Amazon QuickSight](https://docs.aws.amazon.com/quicksight/latest/user/locate-function.html)**
>
> Use the locate function for calculated fields in Amazon QuickSight.

---

<div class="post-metadata">

**Author:** ![ArtSal](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@ArtSal](https://community.amazonquick.com/u/ArtSal)\
**Post date:** [August 18, 2024, 11:41am UTC](https://community.amazonquick.com/t/multi-select-dropdown-parameter-doesnt-allow-contains-filter/14601/5 "2024-08-18T11:41:36Z")

</div>

Hi @Max @tarushtg  
I am facing a similar issue even though I am using ‘in’ function. I have a calculated filed called ‘VAL LIST’ and then used a filter. The ‘in’ function is combined with a multivalue parameter wrapped in ifelse function.  
`ifelse(in({ID},${IDI}),VAL,'NA')`

When I use the calculated field as a filter I get the error message on the ‘ID’ control.

> Following items are incompatible with Multi-select drop down. Please update/remove them to fix the broken visuals.
> 
> Filter - “CONTAINS” filter on column VAL LIST

Interestingly enough the filters work as expected. Would you know why this happens?
