Sublist Count


#1

I have a list with sublist and need to count the sublists that are the same.

Cant figure it out?


#2

Use the List.Count node and change the Levels. Here is information on Lists @ Levels http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/


#3

Maybe I explained it wrong.
List 1 and 2 has the same value in index 0 to 3 so instead I need 1 list with those indexes.


#4

If I am understanding correctly, you want to get rid of duplicate sublists? List.UniqueItems will give you a list of only the unique sublists in your list. :slight_smile:


#5

Thank you. That was easy


#6

One more question.
How can I count the number of all list that I just combined into unique lists?

Not sure I explained this correct. Does it make sense?

What i want is to count how many of each unique item there is?


#7

Do you mean to count how many sublists there were for each unique sublist?


Unique items not workin on a sublist
#8

Exactly!


#9

Hmm well my first thought is to use List.GroupByKey, and since lists as keys are not supported, to use a String.Join to get the keys from the sublists. There might be a better method but off the top of my head this does the trick:


#10

Thank you. I will try that.