4 Replies Latest reply: Sep 30, 2016 4:14 PM by Tanya Ruppell

# Show values that occur multiple times

Hello,

This is going to be a bit complicated to explain, so please bear with me! I am basically trying to find the intersection based on my filters.

I have a set expression that returns a number of items depending on the filter selections. I would like to add another layer of processing to exclude some items.

If I have selected/filtered for 2 values, I want only items that appear in my set 2 times.

If I have selected/filtered for 3 values, I want only items that appear in my set 3 times.

There is no limit to the number of values the user can select. It will likely often be 20 or so.

Is this possible? Thanks!

• ###### Re: Show values that occur multiple times

Would you be able to share what you have right now? and if possible a sample?

• ###### Re: Show values that occur multiple times

I've put together a simple sample that I think will demonstrate my main question.

Data: A group of people and what they ate for lunch. Given any combination of people (filter pane), what are the dishes they had in common?

name, food

Barb, soup

Earl, soup

Barb, ham sandwich

Carl, veggie sandwich

Diane, ham sandwich

Earl, veggie sandwich

Barb, cake

Carl, fruit

Diane,apple pie

Earl, fruit

]

So

• if I select Adam & Carl, I should report salad and veggie sandwich
• if I select Adam & Diane, I should report salad and apple pie
• if I select Adam, Carl & Diane, I should only report salad

Now, the second part of this is that instead of a table to count from, I actually have a set statement that I'm counting from. Does that make a difference?

• ###### Re: Show values that occur multiple times

Can you try this:

To display food:

=Concat(DISTINCT {<food = {"=Count(DISTINCT name) = Count(TOTAL DISTINCT name)"}>} food, ', ')

To count food:

=Count(DISTINCT {<food = {"=Count(DISTINCT name) = Count(TOTAL DISTINCT name)"}>} food)

• ###### Re: Show values that occur multiple times

Thanks again, Sunny!