# Top/Bottom filter with 'Other' case

**URL:** <https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170>\
**Category:** Q&A\
**Tags:** filters, filters-controls-and-parameters, Business-Intelligence-Engineer, quick-sight\
**Created:** [February 28, 2025, 5:26pm UTC](https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170 "2025-02-28T17:26:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanoc](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@stefanoc](https://community.amazonquick.com/u/stefanoc)\
**Post date:** [February 28, 2025, 5:26pm UTC](https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170/1 "2025-02-28T17:26:12Z")

</div>

Hi there.  
I have a dataset with a list of customer cases, each with a specific reason assigned.

I wanted to create plots (eg, a pie chart) showing the count of cases grouped by reason. However, since there are many reasons, I would only like to show the top x (by number of cases opened).  
To do so parametrically, I have created a Top and bottom filter using a parameter x so I can select x in the controls.

This works pretty well, but I would like to also see an extra reason ‘Other’ created, so that even if only 3 reasons are selected, all the other cases end up in the big ‘Other’ slice, for reference.

I see this option is available if, instead of creating a Top and bottom filter, I use the ‘Number of slices displayed’ in the pie chart properties. Selecting 3 there, it creates a fourth slice named ‘Other’. This solution doesn’t work for me because I can’t use a parameter there so the number of slices is not customisable.

Is there a way to have the same functionality with a Top and bottom filter?

---

<div class="post-metadata">

**Author:** ![prantika\_sinha](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/prantika_sinha/32/21878_2.png) [@prantika\_sinha](https://community.amazonquick.com/u/prantika_sinha)\
**Post date:** [March 1, 2025, 7:37pm UTC](https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170/2 "2025-03-01T19:37:00Z")

</div>

Hi @stefanoc ,

Welcome to the Quick Sight Community!!

I think we can achieve this with 2 step calculation.  
step 1: create rank against no. of cases for reason  
step 2: create modified reason calculation as  
ifesle( rank\<=\<top/bottom parameter\>, reason, ‘Other’)  
Note: you may need to change the ranking formula sorting based on your requirement to show top/bottom criteria

You can then use this in pie chart instead of the original reason field.

Thanks,  
Prantika

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [March 18, 2025, 4:57pm UTC](https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170/3 "2025-03-18T16:57:45Z")

</div>

Hi @stefanoc,  
It’s been awhile since we last heard from you on this thread, did you have any additional questions or were you able to find a work around from the suggestion provided above?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

---

<div class="post-metadata">

**Author:** ![Brett](https://d2orw1595917va.cloudfront.net/user_avatar/community.amazonquick.com/brett/32/36494_2.png) [@Brett](https://community.amazonquick.com/u/Brett)\
**Post date:** [March 18, 2025, 8:19pm UTC](https://community.amazonquick.com/t/top-bottom-filter-with-other-case/43170/4 "2025-03-18T20:19:35Z")

</div>

Hi @stefanoc,  
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!
