Help with filtering and counting similar items


#1

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

Any suggestions?


#2

Are you trying to count how many times the same combination of parameters appears? If that is the case, you should try String.concat after the Transpose and then count occurrences / groupbykey + count.


#3

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


#4

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


#5

many thanks @kennyb6 you saved my life :sweat_smile:

Thank you @mellouze I really appreciate your help :slightly_smiling_face:


#6

No problem :grinning: 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)


#7

@kennyb6 great one mate.

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