# Tip for how to filter a table then count occurrences, please!

**URL:** <https://community.glideapps.com/t/tip-for-how-to-filter-a-table-then-count-occurrences-please/25415>\
**Category:** Ask for Help\
**Created:** [April 11, 2021, 8:06am UTC](https://community.glideapps.com/t/tip-for-how-to-filter-a-table-then-count-occurrences-please/25415 "2021-04-11T08:06:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 11, 2021, 8:30am UTC](https://community.glideapps.com/t/tip-for-how-to-filter-a-table-then-count-occurrences-please/25415/4 "2021-04-11T08:30:54Z")

</div>

This something that I do in my apps _all_ the time. I described the technique that I use below:

> [@Array to array relation with AND condition](https://community.glideapps.com/t/array-to-array-relation-with-and-condition/23909/4):
>
> I generally use a combination of templates and multi-relations for this type of dynamic filtering. The basic idea is: In the table that contains your source data, create a template column that concatenates each of the values that you’ll be filtering on. In your example, it might look something like: House:5 BR:3 WC Apartment:1 BR:1 WC Condo:3 BR:2 WC etc.. Next create an identical template that concatenates the same values from your User Specific Columns Finally, create a multi-relation tha…

Essentially it boils down to dynamically generating a multi-relation for displaying the filtered results, and doing a rollup through that relation to get a dynamic count. It works very well.

---

_[View the full topic](https://community.glideapps.com/t/tip-for-how-to-filter-a-table-then-count-occurrences-please/25415)._
