# Help with filtering and counting similar items

**URL:** <https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121>\
**Category:** Uncategorized\
**Created:** [October 12, 2018, 8:02am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121 "2018-10-12T08:02:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![saeedy3](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@saeedy3](https://forum.dynamobim.com/u/saeedy3)\
**Post date:** [October 12, 2018, 8:02am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/1 "2018-10-12T08:02:07Z")

</div>

Hi Everyone,

I am trying to count the occurance in my list. I looked at earlier posts and also tried a couple of nodes but I wasn’t successful. So I am having the current table as you can see here:

| width | height | material | finish | count |
| --- | --- | --- | --- | --- |
| 400 | 900 | dark | hpl | 3 |
| 500 | 1200 | white | laminate | 1 |
| 350 | 850 | yellow | laminate | |
| 400 | 900 | dark | hpl | |
| 400 | 900 | dark | hpl | |

So I am trying to identify and count the similar rows in my list. I tried it in dynamo as you can see here but cound’t manage to solve it

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/6/76d8d1308aee7c40cf75bb9b162008784530d546.png)

Any suggestions?

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [October 12, 2018, 8:05am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/2 "2018-10-12T08:05:58Z")

</div>

Are you trying to count how many times the same combination of parameters appears? If that is the case, you should try [String.concat](http://dictionary.dynamobim.com/#/Core/String/Action/Concat) after the Transpose and then count occurrences / groupbykey + count.

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [October 12, 2018, 8:11am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/3 "2018-10-12T08:11:42Z")

</div>

> [@kennyb6](#):
>
> you should try [String.concat](http://dictionary.dynamobim.com/#/Core/String/Action/Concat)

I think that’s definitely the way to do it too 🙂 If I may, you might alsso want to convert all the objects in string before applying String.Concat

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [October 12, 2018, 8:18am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/4 "2018-10-12T08:18:33Z")

</div>

As @mellouze said, for String.Concat to work, you need to convert any numbers into string. Something like this:

 ![countoccurance](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/4/348f52e6bf92ca46f5cdf6b34c14c9890c21f55b.png)

---

<div class="post-metadata">

**Author:** ![saeedy3](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@saeedy3](https://forum.dynamobim.com/u/saeedy3)\
**Post date:** [October 12, 2018, 8:30am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/5 "2018-10-12T08:30:45Z")

</div>

many thanks @kennyb6 you saved my life 😅

Thank you @mellouze I really appreciate your help 🙂

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [October 12, 2018, 8:41am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/6 "2018-10-12T08:41:10Z")

</div>

No problem 😀 if you need to separate them back, instead of using string.Concat, there is string.Join and you can set something to separate them by:  
(the bottom part)

 ![countoccurance2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/0/1084ecd675f1cdcd0ff95e2f112fa71e8818279c.png)

---

<div class="post-metadata">

**Author:** ![saeedy3](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@saeedy3](https://forum.dynamobim.com/u/saeedy3)\
**Post date:** [October 12, 2018, 8:46am UTC](https://forum.dynamobim.com/t/help-with-filtering-and-counting-similar-items/27121/7 "2018-10-12T08:46:47Z")

</div>

@kennyb6 great one mate.

I was just thinking on how to seperate them back 😅 thank you
