Top/Bottom filter with 'Other' case

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?

Hi @stefanoc ,

Welcome to the QuickSight 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

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!

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!